diff options
Diffstat (limited to 'cpan')
-rw-r--r-- | cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm b/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm index 850a7b65cd..1bceb4432d 100644 --- a/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm +++ b/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm @@ -18,7 +18,7 @@ BEGIN { $FIND_VERSION $ERROR $CHECK_INC_HASH]; use Exporter; @ISA = qw[Exporter]; - $VERSION = '0.34'; + $VERSION = '0.38'; $VERBOSE = 0; $DEPRECATED = 0; $FIND_VERSION = 1; @@ -298,10 +298,18 @@ sub check_install { ### Update from JPeacock: apparently qv() and version->new ### are different things, and we *must* use version->new ### here, or things like #30056 might start happening - $href->{uptodate} = + + ### We have to wrap this in an eval as version-0.82 raises + ### exceptions and not warnings now *sigh* + + eval { + + $href->{uptodate} = version->new( $args->{version} ) <= version->new( $href->{version} ) ? 1 : 0; + + }; } if ( $DEPRECATED and version->new($]) >= version->new('5.011') ) { @@ -322,6 +330,9 @@ sub _parse_version { my $str = shift or return; my $verbose = shift or 0; + ### skip lines which doesn't contain VERSION + return unless $str =~ /VERSION/; + ### skip commented out lines, they won't eval to anything. return if $str =~ /^\s*#/; |