good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^2: Installing a module that is perl-version specificby chuckbutler (Monsignor) |
on Apr 01, 2010 at 01:23 UTC ( [id://832177]=note: print w/replies, xml ) | Need Help?? |
Building on the submission by ikegami:
We pick the correct version of the module to use. Then load the module file and import the symbols dynamically, with an eval. Then we setup the @EXPORT list so it is available when the ->import() subroutine runs as part of use, the symbols are imported into Main::. Update and Postscript: If the package statement in the per-version Date::Manip's are left as-is, the following code is preferred:
This should work well. Good luck. -c
In Section
Seekers of Perl Wisdom
|
|