in reply to How do I require a specific version?
Exporter provides import for most modules, and Exporter's import has support for version checking. However, Module::Pluggable does not use Exporter. It has a custom import which doesn't provide support for version checking.
Looking into Exporter, I see it calls the function VERSION from UNIVERSAL, so all you have to do is:
BEGIN { require Module::Pluggable; Module::Pluggable->VERSION(2.9); } use Module::Pluggable ...your usual args...;
That's the first I've heard of the UNIVERSAL::VERSION function. neat!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: How do I require a specific version?
by jk2addict (Chaplain) on Jul 27, 2005 at 01:41 UTC |