In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/6ba8cc3796ec7d9118fe777db057a603fcc4595d?hp=866f9d6c33c5b1ed70962d63bad47d37c13139dc>

- Log -----------------------------------------------------------------
commit 6ba8cc3796ec7d9118fe777db057a603fcc4595d
Author: Chris Williams <[email protected]>
Date:   Fri Apr 23 16:11:39 2010 +0100

    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()
-----------------------------------------------------------------------

Summary of changes:
 Porting/Maintainers.pl                             |    2 +-
 .../lib/Module/Load/Conditional.pm                 |   15 +++++++++++++--
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 2e6075a..fd8001b 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -958,7 +958,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],
        '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 850a7b6..1bceb44 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*#/;
         

--
Perl5 Master Repository

Reply via email to