On Wed, May 15, 2013 at 4:13 PM, Ron Bergin <r...@i.frys.com> wrote:
> shawn wilson wrote:
>> I asked this in #perl-help and was told that by the time perl checked
>> the version, the module was already loaded - is there a way to check
>> the version without completely loading the module so that when one
>> failed, I could move on to another module of the same name whose
>> version might succeed?
>>
>
> Why not specify the minimum version number that your script requires in
> the use statement?  If that version is not available, then what's the
> point of going forward?
>

See my test case - I do have a minimum version. The point in going
forward is that the minimum version IS met further along the path.

> If you don't want to do that, then you could use Module::Load::Conditional
> to test if the desired version is loadable.
>
> http://search.cpan.org/~bingos/Module-Load-Conditional-0.54/lib/Module/Load/Conditional.pm
>

That module might work if I manually cycle through single paths in
@INC and test. Though I'm not sure about the side effects of doing
this might be?

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to