On Sat, 05 Oct 2002 15:51:04 -0700, Allison Randal wrote:

> On Sat, Oct 05, 2002 at 02:50:11PM -0400, Trey Harris wrote:

>> Ah, but the usual case is this:

>> You download from CPAN class A that depends on version 1.0 of class N. You
>> then download class B that also depends on version 1.0 of class N. You create
>> an application that uses both classes A and B (and thus N through the
>> dependencies.) Some time later, you discover a bug that requires you to
>> upgrade class B, but the upgrade now depends on class 1.1 of class N.  Class
>> A hasn't been upgraded yet, and turns out not to work well with version 1.1
>> of N.  So you need both versions 1.1 and 1.0 of class N running in the
>> application--preferably without having to modify any of your app, class A, or
>> class B.

>> This could be made to work (assuming that classes A and B both specify which
>> version of N they need).

> Aye, that's the case it was designed to fix. The others are just extras.
> 
> class A would have:
> 
>     use Acme::N-1_0; # or whatever the format of the name is
> 
> while the updated class B would have:
> 
>    use Acme::N-1_1;
> 
> The two versions can co-exist because they have different names.

Assuming that A and B do not both explicity specify which version they need, it
would then seem a SMOP to hijack use() to use the correct version of the module for
each class.  Correct?

-- c

Reply via email to