On Sun, 4 Feb 2001 [EMAIL PROTECTED] wrote:

> >>>>> "Dave" == Dave Storrs <[EMAIL PROTECTED]> writes:
> 
> 
> Dave> When you want to install a new version, you simply prepend it
> Dave> with its version number (or insert it at appropriate place).
> 
> Dave> The order is, of course, irrelevant...you can order it as 1.3,
> Dave> 2.0, 1.0 if you want, but then 1.3 would be loaded by default
> Dave> and you would need to explicitly request other versions.
> 
> Dave> I'm sure this idea can be improved on, but it's a first cut.
> Dave> What do people think?
> 
> You want this to work with multiple module versions side by side.  We
> have a disk namespace where we put every module version in its own
> directory, and the user can choose which version is required by
> specifying 'use lib'.  When a new version comes out, we install it
> without touching the existing files - which makes backing out an
> upgrade very easy.
> 
> If multiple versions of a module could co-exist in the same program,
> e.g. by extending the namespace by the module version number, that
> would solve some issues in e.g. mod_perl, or in Storable release x ->
> x+1 migration scripts.
> 
> Hildo
 

I see what you mean...I had only been thinking of how to handle it when
you had base classes inherited from different versions of the same thing.  
I'd still like to suggest that we add the ability to consolidate versions
into one file; I'm sure that some (many) people prefer to have their
versions in separate files, but I (and, I imagine, at least some others)
would find it easier if all versions were in one file, thereby making it
easy to (e.g.) move all of Foo:: from one machine to another without
accidentally leaving bits behind.

Suppose you could do the following:


use Bar::Quux::1.3;     # Parses the file looking for __VERSION 1.3__,
                        #    ignores everything except that version
use Bar::Quux::2.0;     # Ditto for __VERSION 2.0__

Bar::Quux::1.3::do_stuff();   # Calls version 1.3 do_stuff()
Bar::Quux::2.0::do_stuff();   # Calls version 2.0 do_stuff()
Bar::Quux::do_stuff();        # Calls version 2.0 do_stuff(), as that is
                              #    highest version currently loaded

I believe that all of this could be done with a straightforward aliasing
of namespaces at load time.

Is this better?

                        Dave

Reply via email to