>>>>> On Wed, 12 Feb 2003 23:43:53 -0800 (PST), Nick Tonkin <[EMAIL PROTECTED]> said:

 >> > (I would really like to take a broom to this area of CPAN and get
 >> > everything organized into a rational namespace hierarchy, but I guess
 >> > that's not going to happen.)
 >> 
 >> It usually does not happen because all authors legitimately claim that
 >> they cannot change their namespace because the modules already have so
 >> many users.

  > Heh. Sounds like we need some kind of magical uber-symlink system for perl
  > modules so we can move them around :)

I seem to recall Perl6 might have something like

    use Fooray::Barteligence::Bazozer as Baz

 >> But of course, if you want to champion a Weather:: namespace and give
 >> clear directions for future development and set up a mailing list for
 >> weather-related modules and commit to it for a couple of years, then
 >> this would be a Good Thing.

  > Hm. My right (?) brain says to do it because it is such a mess now. My
  > left brain says to forget about it and let the chaos be happy. My total
  > brain has been watching Dave Rolsky wrestling with DateTime for the last
  > few weeks and says "Are you crazy?!"

Exactly:-)

  > Seriously though, I wouldn't mind taking on such a project except that I
  > have little confidence it would work, for the above-mentioned reason: the
  > authors wouldn't be likely to cooperate, and (unlike Rolsky) I am not
  > willing to reimplement myself everything that now exists.

  > Andreas, suppose there was agreement with a couple of the authors of the
  > more usefule modules: how would a transition work? I can imagine a system
  > where the modules were maintained in both namespaces for a period of time,
  > with a README in the to-be-obsolete one explaining that it's going to move
  > or whatever. Has that or something similar ever been done?

I think in many cases one would get away with AUTOLOAD. Move the code
to the new namespace and let the old namespace be handled by an
AUTOLOAD dispatcher that simply calls the new namespace. In the
beginning you issue a warning when the old namespace gets loaded. Time
goes by and you add a warning to the dispatcher whenever old namespace
is called. Then you slowly stop maintaining the dispatcher.

A similar approach has successfully been done with my Msql.pm which
predated the DBI. When Jochen Wiedmann's DBD::Msql started to work, we
made all Msql.pm classes simple wrappers to DBD::Msql. Today Msql.pm
is phased out, I don't think that anybody is still using it.

-- 
andreas

Reply via email to