Update CPANPLUS to CPAN version 0.9102
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Mon, 28 Feb 2011 15:17:27 +0000 (15:17 +0000)
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Mon, 28 Feb 2011 15:57:11 +0000 (15:57 +0000)
  [DELTA]

  Changes for 0.9102      Mon Feb 28 11:35:43 2011
  ================================================
  * Only send NAs for a 'perl' prereq when it actually is
    Not Applicable

Porting/Maintainers.pl
cpan/CPANPLUS/lib/CPANPLUS.pm
cpan/CPANPLUS/lib/CPANPLUS/Internals.pm
cpan/CPANPLUS/lib/CPANPLUS/Internals/Report.pm
cpan/CPANPLUS/lib/CPANPLUS/Shell/Default.pm
pod/perldelta.pod

index 041c0ce..2714806 100755 (executable)
@@ -409,7 +409,7 @@ use File::Glob qw(:case);
     'CPANPLUS' =>
        {
        'MAINTAINER'    => 'kane',
-       'DISTRIBUTION'  => 'BINGOS/CPANPLUS-0.9101.tar.gz',
+       'DISTRIBUTION'  => 'BINGOS/CPANPLUS-0.9102.tar.gz',
        'FILES'         => q[cpan/CPANPLUS],
        'EXCLUDED'      => [ qr{^inc/},
                             qr{^t/dummy-.*\.hidden$},
index 3e63cb3..79a4816 100644 (file)
@@ -13,7 +13,7 @@ BEGIN {
     use vars        qw( @EXPORT @ISA $VERSION );
     @EXPORT     =   qw( shell fetch get install );
     @ISA        =   qw( Exporter );
-    $VERSION = "0.9101";     #have to hardcode or cpan.org gets unhappy
+    $VERSION = "0.9102";     #have to hardcode or cpan.org gets unhappy
 }
 
 ### purely for backward compatibility, so we can call it from the commandline:
index 2115fad..cf23e92 100644 (file)
@@ -42,7 +42,7 @@ use vars qw[@ISA $VERSION];
             CPANPLUS::Internals::Report
         ];
 
-$VERSION = "0.9101";
+$VERSION = "0.9102";
 
 =pod
 
index e55c04a..a5f079b 100644 (file)
@@ -11,6 +11,7 @@ use Data::Dumper;
 use Params::Check               qw[check];
 use Module::Load::Conditional   qw[can_load];
 use Locale::Maketext::Simple    Class => 'CPANPLUS', Style => 'gettext';
+use version;
 
 $Params::Check::VERBOSE = 1;
 
@@ -347,7 +348,22 @@ sub _send_report {
         ### as FAIL modules where prereqs are not filled
         {   my $prq = $mod->status->prereqs || {};
         
-            while( my($prq_name,$prq_ver) = each %$prq ) {
+            PREREQ: while( my($prq_name,$prq_ver) = each %$prq ) {
+
+                # 'perl' listed as prereq
+
+                if ( $prq_name eq 'perl' ) {
+                   my $req_ver = eval { version->new( $prq_ver ) };
+                   next PREREQ unless $req_ver;
+                   if ( version->new( $] ) < $req_ver ) {
+                      msg(loc("'%1' requires a higher version of perl than your current ".
+                              "version -- sending N/A grade.", $name), $verbose);
+
+                      $grade = GRADE_NA;
+                      last GRADE;
+                   }
+                }
+
                 my $obj = $cb->module_tree( $prq_name );
                 my $sub = CPANPLUS::Module->can(         
                             'module_is_supplied_with_perl_core' );
@@ -365,7 +381,7 @@ sub _send_report {
                              $prq_name, $name ), $verbose );
 
                     $grade = GRADE_NA;
-                    last GRADE;        
+                    last GRADE;
                 }
 
                 if ( !$obj ) {
@@ -377,7 +393,7 @@ sub _send_report {
                                $name, $prq_ver ), $verbose );
                              
                       $grade = GRADE_NA;
-                      last GRADE;        
+                      last GRADE;
                     }
                 }
 
@@ -388,7 +404,7 @@ sub _send_report {
                              $name, $prq_ver ), $verbose );
                              
                     $grade = GRADE_NA;
-                    last GRADE;        
+                    last GRADE;
                 }                             
             }
         }
@@ -413,8 +429,8 @@ sub _send_report {
         } elsif ( PERL_VERSION_TOO_LOW->( $buffer ) ) {
             msg(loc("'%1' requires a higher version of perl than your current ".
                     "version -- sending N/A grade.", $name), $verbose);
-        
-            $grade = GRADE_NA;                
+
+            $grade = GRADE_NA;
 
         ### perhaps where were no tests...
         ### see if the thing even had tests ###
@@ -426,7 +442,7 @@ sub _send_report {
             $grade = GRADE_UNKNOWN
 
         } else {
-            
+
             $grade = GRADE_FAIL;
         }
 
index 3d53b76..4a7a9e5 100644 (file)
@@ -26,7 +26,7 @@ local $Data::Dumper::Indent     = 1; # for dumpering from !
 BEGIN {
     use vars        qw[ $VERSION @ISA ];
     @ISA        =   qw[ CPANPLUS::Shell::_Base::ReadLine ];
-    $VERSION = "0.9101";
+    $VERSION = "0.9102";
 }
 
 load CPANPLUS::Shell;
index 4ca8b5b..ea6d46f 100644 (file)
@@ -96,6 +96,10 @@ XXX
 
 =item *
 
+C<CPANPLUS> has been upgraded from version 0.9101 to 0.9102
+
+=item *
+
 C<CPANPLUS::Dist::Build> has been upgraded from version 0.52 to 0.54
 
 =item *