Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: How do you do multi-version modules?

by pokki (Scribe)
on Oct 13, 2012 at 23:59 UTC ( #998889=note: print w/ replies, xml ) Need Help??


in reply to Re: How do you do multi-version modules?
in thread How do you do multi-version modules?

If this is an OO-based module, you could pass a protocol version to the constructor. (Kinda like many file formats include a version.) If it's not, you could write your own import sub and use use module "1.0.0"; instead of use module 1.0.0;. This would be a bit error prone.

And if you go this route, the first version that handles protocol/API/etc. versions should assume that "no API version given" is a valid input that means "the oldest version that did not know how to handle API versions", for the sake of backwards compatibility.


Comment on Re^2: How do you do multi-version modules?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2015-07-02 10:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (33 votes), past polls