diff options
author | Chris Williams <chris@bingosnet.co.uk> | 2010-04-23 16:11:39 +0100 |
---|---|---|
committer | Jesse Vincent <jesse@bestpractical.com> | 2010-08-25 14:15:21 -0400 |
commit | cce568d984cf7d939dfc5785b07107ef72307d19 (patch) | |
tree | 871d0df0c5f40a13f4275b84c3821b2d1f021fea | |
parent | 0c91b7cde4bb7186290b03547b39c1ba6d8b8bb5 (diff) | |
download | perl-cce568d984cf7d939dfc5785b07107ef72307d19.tar.gz |
Update Module::Load::Conditional to CPAN version 0.38
Addresses a serious problem with CPANPLUS and behaviour of
version-0.82. Checking for out of date modules with 'o'
in CPANPLUS blows up if any modules that are installed
have non-numeric version strings.
Extract from Changelog:
Changes for 0.38 Fri Apr 23 15:52:38 BST 2010
=================================================
* New release of version raises exceptions on
parse errors. Use eval to guard ourselves
against this.
Changes for 0.36 Tue Feb 9 14:16:21 GMT 2010
=================================================
* Apply patch from Pavel Shaydo RT #53546 to improve
the performance of _parse_version()
-rwxr-xr-x | Porting/Maintainers.pl | 2 | ||||
-rw-r--r-- | cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm | 15 |
2 files changed, 14 insertions, 3 deletions
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index ca5e44eb45..91ce894c9f 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -1035,7 +1035,7 @@ use File::Glob qw(:case); 'Module::Load::Conditional' => { 'MAINTAINER' => 'kane', - 'DISTRIBUTION' => 'BINGOS/Module-Load-Conditional-0.34.tar.gz', + 'DISTRIBUTION' => 'BINGOS/Module-Load-Conditional-0.38.tar.gz', 'FILES' => q[cpan/Module-Load-Conditional], 'CPAN' => 1, 'UPSTREAM' => 'cpan', 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*#/; |