This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade CPANPLUS to 0.83_08
[perl5.git] / lib / CPANPLUS / bin / cpan2dist
index 41349f4..8c913ba 100644 (file)
@@ -37,7 +37,8 @@ GetOptions( $opts,
             'logfile=s',            'timeout=s',
             'dist-opts=s%',         'set-config=s%',
             'default-banlist!',     'set-program=s%',
-            'default-ignorelist!',  'edit-metafile!'
+            'default-ignorelist!',  'edit-metafile!',
+            'install!'
         );
         
 die usage() if exists $opts->{'help'};
@@ -325,7 +326,8 @@ for my $name (@modules) {
     }        
     
 
-    my $dist = eval { 
+    my $target  = $opts->{'install'} ? 'install' : 'create';
+    my $dist    = eval { 
                     local $SIG{ALRM} = sub { die bless {}, ALARM_CLASS }
                         if $timeout;
                         
@@ -334,8 +336,8 @@ for my $name (@modules) {
                     my $dist_opts = $opts->{'dist-opts'} || {};
 
                     my $rv = $obj->install(   
-                            prereq_target   => 'create',
-                            target          => 'create',
+                            prereq_target   => $target,
+                            target          => $target,
                             keep_source     => $keep,
                             prereq_build    => $prereqbuild,
 
@@ -450,6 +452,8 @@ Options:
 
     ### take no argument:
     --help          Show this help message
+    --install       Install this package (and any prerequisites you built)
+                    after building it. 
     --skiptest      Skip tests. Can be negated using --noskiptest
     --force         Force operation. Can be negated using --noforce
     --verbose       Be verbose. Can be negated using --noverbose
@@ -520,6 +524,9 @@ Examples:
     ### don't bother running tests
     cpan2dist --format CPANPLUS::Dist::Deb --buildprereq --skiptest DBI
     
+    ### build a debian package of DBI and it's prerequisites and install them
+    cpan2dist --format CPANPLUS::Dist::Deb --buildprereq --install DBI
+    
     ### Build a package, whose format is determined by your config, of 
     ### the local tarball, reloading cpanplus' indices first and using
     ### the tarballs Makefile.PL if it has one.