diff options
author | Chris Williams <chris@bingosnet.co.uk> | 2010-04-23 16:11:39 +0100 |
---|---|---|
committer | Chris Williams <chris@bingosnet.co.uk> | 2010-04-23 16:11:39 +0100 |
commit | 6ba8cc3796ec7d9118fe777db057a603fcc4595d (patch) | |
tree | b4f4f23f7054c023ff1cedb8a92d08aef80e9c85 /cpan | |
parent | 866f9d6c33c5b1ed70962d63bad47d37c13139dc (diff) | |
download | perl-6ba8cc3796ec7d9118fe777db057a603fcc4595d.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()
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*#/; |