Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Multiple versions of a module

by gam3 (Curate)
on Mar 16, 2007 at 20:27 UTC ( [id://605215]=note: print w/replies, xml ) Need Help??


in reply to Multiple versions of a module

You can use the VERSION method.
package Module; use Data::Dumper; sub VERSION { my $class = shift; my $version = shift; require(sprintf("%s_%d.pm", $class, $version)); push @ISA, $class . '_' . $version; 1; } 1;
If you want to use 2.1 you will need to convert the numbers into something like 2_1, as Module_2.1 is not a valid Module name.
-- gam3
A picture is worth a thousand words, but takes 200K.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-19 13:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found