diamantis has asked for the wisdom of the Perl Monks concerning the following question:
I want to check if a few modules are newer from some version.
I am checking if they exist, e.g.:
(code modified from Perl CookBook) Can I somehow check for the module version? I thought that eval "require module version" would work. Any suggestions ?? Thank youBEGIN { my $mod = 'File::Spec'; unless (eval "require $mod") { print "couldn't load $mod: $@"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: checking module version
by Joost (Canon) on Jun 13, 2007 at 12:23 UTC | |
by ikegami (Patriarch) on Jun 13, 2007 at 13:54 UTC | |
|
Re: checking module version
by andreas1234567 (Vicar) on Jun 13, 2007 at 12:46 UTC | |
|
Re: checking module version
by citromatik (Curate) on Jun 13, 2007 at 12:23 UTC | |
|
Re: checking module version
by sen (Hermit) on Jun 13, 2007 at 12:40 UTC | |
|
Re: checking module version
by ikegami (Patriarch) on Jun 13, 2007 at 13:50 UTC | |
|
Re: checking module version
by sago (Scribe) on Jun 14, 2007 at 10:56 UTC |