Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

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 ( [id://673632]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://673632]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-04-26 06:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found