in reply to Re^2: 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?

The real problem is similar to a dynamic plugin system, but I do not want the residual effects of loading a package (permanently modifying the symbol table) that exists elsewhere.

How do you intend to avoid permanently modifying the symbol table? Why would you want that, anyway? If you don't permanently modify the symbol table won't you have to reload the entire module on each function call?

-sam
  • Comment on Re^3: How can I (safely) use packages of the same name but different versions?

Replies are listed 'Best First'.
Re^4: How can I (safely) use packages of the same name but different versions?
by xevian (Sexton) on Mar 11, 2008 at 22:00 UTC
    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.
      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