update to CPANPLUS 0.88
authorDavid Mitchell <davem@iabyn.com>
Tue, 7 Jul 2009 16:06:43 +0000 (17:06 +0100)
committerDavid Mitchell <davem@iabyn.com>
Tue, 7 Jul 2009 16:06:43 +0000 (17:06 +0100)
Porting/Maintainers.pl
lib/CPANPLUS.pm
lib/CPANPLUS/Backend.pm
lib/CPANPLUS/Dist/MM.pm
lib/CPANPLUS/Hacking.pod
lib/CPANPLUS/Internals.pm
lib/CPANPLUS/Internals/Constants.pm
lib/CPANPLUS/Module.pm
lib/CPANPLUS/Shell/Default.pm
lib/CPANPLUS/t/20_CPANPLUS-Dist-MM.t

index c08fd5d..fa2b907 100755 (executable)
@@ -449,7 +449,7 @@ package Maintainers;
     'CPANPLUS' =>
        {
        'MAINTAINER'    => 'kane',
-       'DISTRIBUTION'  => 'KANE/CPANPLUS-0.87_03.tar.gz',
+       'DISTRIBUTION'  => 'KANE/CPANPLUS-0.88.tar.gz',
        'FILES'         => q[lib/CPANPLUS.pm
                             lib/CPANPLUS/Backend
                             lib/CPANPLUS/Backend.pm
index a31fa3b..8ef3595 100644 (file)
@@ -13,7 +13,7 @@ BEGIN {
     use vars        qw( @EXPORT @ISA $VERSION );
     @EXPORT     =   qw( shell fetch get install );
     @ISA        =   qw( Exporter );
-    $VERSION = "0.87_03";     #have to hardcode or cpan.org gets unhappy
+    $VERSION = "0.88";     #have to hardcode or cpan.org gets unhappy
 }
 
 ### purely for backward compatibility, so we can call it from the commandline:
index 71953e7..24336f4 100644 (file)
@@ -1103,7 +1103,9 @@ $name - Snapshot of your installation at $now
 
 $head SYNOPSIS
 
-perl -MCPANPLUS -e "install file://full/path/to/$name"
+To install the modules from this snapshot, run:
+
+  cpanp -i file://full/path/to/${name}.pm
 
 $head CONTENTS
 
index 5baa24f..262c83b 100644 (file)
@@ -680,7 +680,7 @@ sub create {
                 if ( NO_TESTS_DEFINED->( $captured ) ) {
                     msg( NO_TESTS_DEFINED->( $captured ), 0 )
                 } else {
-                    msg( loc( "MAKE TEST passed: %2", $captured ), $verbose );
+                    msg( loc( "MAKE TEST passed: %1", $captured ), $verbose );
                 }
             
                 $dist->status->test(1);
index c89a403..1a28b9e 100644 (file)
@@ -6,23 +6,16 @@ CPANPLUS::Hacking
 
 =head1 DESCRIPTION
 
-This document attempts to describe how to easiest develop with the
-CPANPLUS environment, how certain things work and why.
+This document attempts to describe how to develop with the
+CPANPLUS environment most easily, how certain things work and why.
 
 This is basically a quick-start guide to people who want to add
 features or patches to CPANPLUS.
 
 =head1 OBTAINING CPANPLUS
 
-CPANPLUS offers snapshots from the stable and unstable branches.
-After every patch to either of the branches, the snapshot is
-automatically updated.
-
-You can find the stable branch here (which should be equal to the
-CPAN release): L<http://p4.elixus.org/snap/cpanplus-dist.tar.gz>
-
-And the development branch here:
-L<http://p4.elixus.org/snap/cpanplus-devel.tar.gz>
+Checkout CPANPLUS from its Subversion repository at 
+L<http://oss.dwim.org/cpanplus-devel> .
 
 =head1 INSTALLING CPANPLUS
 
index 3bc0ea7..3df48c8 100644 (file)
@@ -42,7 +42,7 @@ use vars qw[@ISA $VERSION];
             CPANPLUS::Internals::Report
         ];
 
-$VERSION = "0.87_03";
+$VERSION = "0.88";
 
 =pod
 
index d891fbd..1d05c98 100644 (file)
@@ -39,6 +39,7 @@ use constant CONFIG_BOXED   => 'CPANPLUS::Config::Boxed';
 use constant DEFAULT_SOURCE_ENGINE
                             => 'CPANPLUS::Internals::Source::Memory';
 
+use constant TARGET_INIT    => 'init';
 use constant TARGET_CREATE  => 'create';
 use constant TARGET_PREPARE => 'prepare';
 use constant TARGET_INSTALL => 'install';
index 3fc1462..5f7cec0 100644 (file)
@@ -808,6 +808,9 @@ sub dist {
     
     
     DIST: {
+        ### just wanted the $dist object?
+        last DIST if $target eq TARGET_INIT;
+    
         ### first prepare the dist
         $dist->prepare( %$args ) or return;
         $self->status->prepared(1);
@@ -872,7 +875,7 @@ sub test {
 
 =pod
 
-=head2 $bool = $self->install([ target => 'prepare|create|install', format => FORMAT_TYPE, extractdir => DIRECTORY, fetchdir => DIRECTORY, prefer_bin => BOOL, force => BOOL, verbose => BOOL, ..... ]);
+=head2 $bool = $self->install([ target => 'init|prepare|create|install', format => FORMAT_TYPE, extractdir => DIRECTORY, fetchdir => DIRECTORY, prefer_bin => BOOL, force => BOOL, verbose => BOOL, ..... ]);
 
 Installs the current module. This includes fetching it and extracting
 it, if this hasn't been done yet, as well as creating a distribution
@@ -904,7 +907,7 @@ sub install {
                         ### match this allow list with Dist->_resolve_prereqs
             target     => { default => TARGET_INSTALL, store => \$target,
                             allow   => [TARGET_PREPARE, TARGET_CREATE,
-                                        TARGET_INSTALL] },
+                                        TARGET_INSTALL, TARGET_INIT ] },
             force      => { default => $conf->get_conf('force'), },
             verbose    => { default => $conf->get_conf('verbose'), },
             format     => { default => $conf->get_conf('dist_type'),
index 25d68ae..faeb6ff 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.87_03";
+    $VERSION = "0.88";
 }
 
 load CPANPLUS::Shell;
index 241c6a2..a203c88 100644 (file)
@@ -98,6 +98,13 @@ ok( $Mod,                       "Loaded object for: " . $InstMod->name );
 ok( $Mod->fetch,                "Fetching module to ".$Mod->status->fetch );
 ok( $Mod->extract,              "Extracting module to ".$Mod->status->extract );
 
+### test target => 'init'
+{   my $dist = $Mod->dist( target => TARGET_INIT );
+    ok( $dist,                  "Dist created with target => " . TARGET_INIT );
+    ok( !$dist->status->prepared,
+                                "   Prepare was not run" );
+}                                
+
 ok( $Mod->test,                 "Testing module" );
 
 ok( $Mod->status->dist_cpan->status->test,