in reply to Re^3: How can I (safely) use packages of the same name but different versions?
in thread How can I (safely) use packages of the same name but different versions?

That's why I'm asking - I'm not sure how I intend to do it :)

I want to do this because I do not want older code (read: default install location) to be calling functions in a newer codebase just because something called a function in the new codebase (and thereby required the new modules, replacing the symbols that existed).

I.e.
My::Package::foo(); ... NEW::My::Package::foo(); ... My::Package::foo(); # this one I want to use the old codebase always, + even if someone called the NEW:: version at some point.
  • Comment on Re^4: How can I (safely) use packages of the same name but different versions?
  • Download Code

Replies are listed 'Best First'.
Re^5: How can I (safely) use packages of the same name but different versions?
by samtregar (Abbot) on Mar 11, 2008 at 22:40 UTC
    And I'm asking why you want that! If I upload v10 of My::Awesome::Module shouldn't all code switch to calling v10 instead of v9? If v10 fixes a critical bug or adds a new feature I'm pretty sure that's what I'd want.

    Put another way, if the new My::Package::foo() isn't supposed to replace the old My::Package::foo() why do they have the same names? My not call it My::OtherPackage::foo()?

    Another thought - are you trying to do development on a live server without affecting the production code?

    -sam