From fb598ba5e55920eb59105c932df653f4fea6966c Mon Sep 17 00:00:00 2001 From: Chris 'BinGOs' Williams Date: Sat, 18 May 2013 01:01:42 +0100 Subject: Remove cpan/CPANPLUS and associated utilities --- cpan/CPANPLUS/Makefile.PL | 11 - cpan/CPANPLUS/bin/cpan2dist | 673 ------- cpan/CPANPLUS/bin/cpanp | 104 - cpan/CPANPLUS/bin/cpanp-run-perl | 11 - cpan/CPANPLUS/lib/CPANPLUS.pm | 272 --- cpan/CPANPLUS/lib/CPANPLUS/Backend.pm | 1344 ------------- cpan/CPANPLUS/lib/CPANPLUS/Backend/RV.pm | 145 -- cpan/CPANPLUS/lib/CPANPLUS/Config.pm | 834 --------- cpan/CPANPLUS/lib/CPANPLUS/Config/HomeEnv.pm | 63 - cpan/CPANPLUS/lib/CPANPLUS/Configure.pm | 637 ------- cpan/CPANPLUS/lib/CPANPLUS/Configure/Setup.pm | 1654 ---------------- cpan/CPANPLUS/lib/CPANPLUS/Dist.pm | 808 -------- cpan/CPANPLUS/lib/CPANPLUS/Dist/Autobundle.pm | 120 -- cpan/CPANPLUS/lib/CPANPLUS/Dist/Base.pm | 261 --- cpan/CPANPLUS/lib/CPANPLUS/Dist/MM.pm | 1044 ----------- cpan/CPANPLUS/lib/CPANPLUS/Dist/Sample.pm | 20 - cpan/CPANPLUS/lib/CPANPLUS/Error.pm | 210 --- cpan/CPANPLUS/lib/CPANPLUS/FAQ.pod | 34 - cpan/CPANPLUS/lib/CPANPLUS/Hacking.pod | 135 -- cpan/CPANPLUS/lib/CPANPLUS/Internals.pm | 556 ------ cpan/CPANPLUS/lib/CPANPLUS/Internals/Constants.pm | 391 ---- .../lib/CPANPLUS/Internals/Constants/Report.pm | 426 ----- cpan/CPANPLUS/lib/CPANPLUS/Internals/Extract.pm | 247 --- cpan/CPANPLUS/lib/CPANPLUS/Internals/Fetch.pm | 476 ----- cpan/CPANPLUS/lib/CPANPLUS/Internals/Report.pm | 696 ------- cpan/CPANPLUS/lib/CPANPLUS/Internals/Search.pm | 367 ---- cpan/CPANPLUS/lib/CPANPLUS/Internals/Source.pm | 1470 --------------- .../lib/CPANPLUS/Internals/Source/Memory.pm | 381 ---- .../lib/CPANPLUS/Internals/Source/SQLite.pm | 383 ---- .../lib/CPANPLUS/Internals/Source/SQLite/Tie.pm | 143 -- cpan/CPANPLUS/lib/CPANPLUS/Internals/Utils.pm | 680 ------- .../lib/CPANPLUS/Internals/Utils/Autoflush.pm | 9 - cpan/CPANPLUS/lib/CPANPLUS/Module.pm | 1839 ------------------ cpan/CPANPLUS/lib/CPANPLUS/Module/Author.pm | 235 --- cpan/CPANPLUS/lib/CPANPLUS/Module/Author/Fake.pm | 83 - cpan/CPANPLUS/lib/CPANPLUS/Module/Checksums.pm | 260 --- cpan/CPANPLUS/lib/CPANPLUS/Module/Fake.pm | 88 - cpan/CPANPLUS/lib/CPANPLUS/Module/Signature.pm | 66 - cpan/CPANPLUS/lib/CPANPLUS/Selfupdate.pm | 554 ------ cpan/CPANPLUS/lib/CPANPLUS/Shell.pm | 343 ---- cpan/CPANPLUS/lib/CPANPLUS/Shell/Classic.pm | 1269 ------------- cpan/CPANPLUS/lib/CPANPLUS/Shell/Default.pm | 1978 -------------------- .../CPANPLUS/Shell/Default/Plugins/CustomSource.pm | 205 -- .../lib/CPANPLUS/Shell/Default/Plugins/HOWTO.pod | 136 -- .../lib/CPANPLUS/Shell/Default/Plugins/Remote.pm | 190 -- .../lib/CPANPLUS/Shell/Default/Plugins/Source.pm | 111 -- cpan/CPANPLUS/t/00_CPANPLUS-Internals-Utils.t | 185 -- cpan/CPANPLUS/t/01_CPANPLUS-Configure.t | 136 -- cpan/CPANPLUS/t/02_CPANPLUS-Internals.t | 147 -- cpan/CPANPLUS/t/03_CPANPLUS-Internals-Source.t | 262 --- cpan/CPANPLUS/t/04_CPANPLUS-Module.t | 360 ---- cpan/CPANPLUS/t/05_CPANPLUS-Internals-Fetch.t | 110 -- cpan/CPANPLUS/t/06_CPANPLUS-Internals-Constants.t | 73 - cpan/CPANPLUS/t/07_CPANPLUS-Internals-Extract.t | 36 - cpan/CPANPLUS/t/08_CPANPLUS-Backend.t | 375 ---- cpan/CPANPLUS/t/09_CPANPLUS-Internals-Search.t | 83 - cpan/CPANPLUS/t/10_CPANPLUS-Error.t | 114 -- cpan/CPANPLUS/t/15_CPANPLUS-Shell.t | 152 -- cpan/CPANPLUS/t/19_CPANPLUS-Dist.t | 441 ----- cpan/CPANPLUS/t/20_CPANPLUS-Dist-MM.t | 430 ----- cpan/CPANPLUS/t/21_CPANPLUS-Dist-No-Build.t | 119 -- cpan/CPANPLUS/t/25_CPANPLUS.t | 90 - cpan/CPANPLUS/t/30_CPANPLUS-Internals-Selfupdate.t | 181 -- cpan/CPANPLUS/t/40_CPANPLUS-Internals-Report.t | 503 ----- cpan/CPANPLUS/t/dummy-CPAN/authors/01mailrc.txt.gz | Bin 137 -> 0 bytes .../authors/id/EUNOXS/Bundle-Foo-Bar-0.01.tar.gz | Bin 850 -> 0 bytes .../t/dummy-CPAN/authors/id/EUNOXS/CHECKSUMS | 35 - .../dummy-CPAN/authors/id/EUNOXS/Foo-Bar-0.01.meta | 13 - .../authors/id/EUNOXS/Foo-Bar-0.01.readme | 2 - .../authors/id/EUNOXS/Foo-Bar-0.01.tar.gz | Bin 1118 -> 0 bytes .../authors/id/EUNOXS/perl5.005_03.tar.gz | Bin 119 -> 0 bytes .../t/dummy-CPAN/authors/id/EUXS/CHECKSUMS | 20 - .../dummy-CPAN/authors/id/EUXS/Foo-Bar-0.01.readme | 2 - .../dummy-CPAN/authors/id/EUXS/Foo-Bar-0.01.tar.gz | Bin 1589 -> 0 bytes .../t/dummy-CPAN/authors/id/MBNOXS/CHECKSUMS | 20 - .../authors/id/MBNOXS/Foo-Bar-0.01.readme | 2 - .../authors/id/MBNOXS/Foo-Bar-0.01.tar.gz | Bin 867 -> 0 bytes .../t/dummy-CPAN/authors/id/MBXS/CHECKSUMS | 20 - .../dummy-CPAN/authors/id/MBXS/Foo-Bar-0.01.readme | 2 - .../dummy-CPAN/authors/id/MBXS/Foo-Bar-0.01.tar.gz | Bin 1541 -> 0 bytes cpan/CPANPLUS/t/dummy-CPAN/autobundle/Snapshot.pm | 19 - .../t/dummy-CPAN/modules/02packages.details.txt.gz | Bin 437 -> 0 bytes .../t/dummy-CPAN/modules/03modlist.data.gz | Bin 583 -> 0 bytes cpan/CPANPLUS/t/inc/conf.pl | 304 --- 84 files changed, 26198 deletions(-) delete mode 100644 cpan/CPANPLUS/Makefile.PL delete mode 100644 cpan/CPANPLUS/bin/cpan2dist delete mode 100644 cpan/CPANPLUS/bin/cpanp delete mode 100644 cpan/CPANPLUS/bin/cpanp-run-perl delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Backend.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Backend/RV.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Config.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Config/HomeEnv.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Configure.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Configure/Setup.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Dist.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Dist/Autobundle.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Dist/Base.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Dist/MM.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Dist/Sample.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Error.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/FAQ.pod delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Hacking.pod delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Internals.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Internals/Constants.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Internals/Constants/Report.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Internals/Extract.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Internals/Fetch.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Internals/Report.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Internals/Search.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Internals/Source.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Internals/Source/Memory.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Internals/Source/SQLite.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Internals/Source/SQLite/Tie.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Internals/Utils.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Internals/Utils/Autoflush.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Module.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Module/Author.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Module/Author/Fake.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Module/Checksums.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Module/Fake.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Module/Signature.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Selfupdate.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Shell.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Shell/Classic.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Shell/Default.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Shell/Default/Plugins/CustomSource.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Shell/Default/Plugins/HOWTO.pod delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Shell/Default/Plugins/Remote.pm delete mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Shell/Default/Plugins/Source.pm delete mode 100644 cpan/CPANPLUS/t/00_CPANPLUS-Internals-Utils.t delete mode 100644 cpan/CPANPLUS/t/01_CPANPLUS-Configure.t delete mode 100644 cpan/CPANPLUS/t/02_CPANPLUS-Internals.t delete mode 100644 cpan/CPANPLUS/t/03_CPANPLUS-Internals-Source.t delete mode 100644 cpan/CPANPLUS/t/04_CPANPLUS-Module.t delete mode 100644 cpan/CPANPLUS/t/05_CPANPLUS-Internals-Fetch.t delete mode 100644 cpan/CPANPLUS/t/06_CPANPLUS-Internals-Constants.t delete mode 100644 cpan/CPANPLUS/t/07_CPANPLUS-Internals-Extract.t delete mode 100644 cpan/CPANPLUS/t/08_CPANPLUS-Backend.t delete mode 100644 cpan/CPANPLUS/t/09_CPANPLUS-Internals-Search.t delete mode 100644 cpan/CPANPLUS/t/10_CPANPLUS-Error.t delete mode 100644 cpan/CPANPLUS/t/15_CPANPLUS-Shell.t delete mode 100644 cpan/CPANPLUS/t/19_CPANPLUS-Dist.t delete mode 100644 cpan/CPANPLUS/t/20_CPANPLUS-Dist-MM.t delete mode 100644 cpan/CPANPLUS/t/21_CPANPLUS-Dist-No-Build.t delete mode 100644 cpan/CPANPLUS/t/25_CPANPLUS.t delete mode 100644 cpan/CPANPLUS/t/30_CPANPLUS-Internals-Selfupdate.t delete mode 100644 cpan/CPANPLUS/t/40_CPANPLUS-Internals-Report.t delete mode 100644 cpan/CPANPLUS/t/dummy-CPAN/authors/01mailrc.txt.gz delete mode 100644 cpan/CPANPLUS/t/dummy-CPAN/authors/id/EUNOXS/Bundle-Foo-Bar-0.01.tar.gz delete mode 100644 cpan/CPANPLUS/t/dummy-CPAN/authors/id/EUNOXS/CHECKSUMS delete mode 100644 cpan/CPANPLUS/t/dummy-CPAN/authors/id/EUNOXS/Foo-Bar-0.01.meta delete mode 100644 cpan/CPANPLUS/t/dummy-CPAN/authors/id/EUNOXS/Foo-Bar-0.01.readme delete mode 100644 cpan/CPANPLUS/t/dummy-CPAN/authors/id/EUNOXS/Foo-Bar-0.01.tar.gz delete mode 100644 cpan/CPANPLUS/t/dummy-CPAN/authors/id/EUNOXS/perl5.005_03.tar.gz delete mode 100644 cpan/CPANPLUS/t/dummy-CPAN/authors/id/EUXS/CHECKSUMS delete mode 100644 cpan/CPANPLUS/t/dummy-CPAN/authors/id/EUXS/Foo-Bar-0.01.readme delete mode 100644 cpan/CPANPLUS/t/dummy-CPAN/authors/id/EUXS/Foo-Bar-0.01.tar.gz delete mode 100644 cpan/CPANPLUS/t/dummy-CPAN/authors/id/MBNOXS/CHECKSUMS delete mode 100644 cpan/CPANPLUS/t/dummy-CPAN/authors/id/MBNOXS/Foo-Bar-0.01.readme delete mode 100644 cpan/CPANPLUS/t/dummy-CPAN/authors/id/MBNOXS/Foo-Bar-0.01.tar.gz delete mode 100644 cpan/CPANPLUS/t/dummy-CPAN/authors/id/MBXS/CHECKSUMS delete mode 100644 cpan/CPANPLUS/t/dummy-CPAN/authors/id/MBXS/Foo-Bar-0.01.readme delete mode 100644 cpan/CPANPLUS/t/dummy-CPAN/authors/id/MBXS/Foo-Bar-0.01.tar.gz delete mode 100644 cpan/CPANPLUS/t/dummy-CPAN/autobundle/Snapshot.pm delete mode 100644 cpan/CPANPLUS/t/dummy-CPAN/modules/02packages.details.txt.gz delete mode 100644 cpan/CPANPLUS/t/dummy-CPAN/modules/03modlist.data.gz delete mode 100644 cpan/CPANPLUS/t/inc/conf.pl (limited to 'cpan') diff --git a/cpan/CPANPLUS/Makefile.PL b/cpan/CPANPLUS/Makefile.PL deleted file mode 100644 index d69b40d9a0..0000000000 --- a/cpan/CPANPLUS/Makefile.PL +++ /dev/null @@ -1,11 +0,0 @@ -use strict; -use ExtUtils::MakeMaker; - -WriteMakefile ( - NAME => 'CPANPLUS', - VERSION_FROM => 'lib/CPANPLUS/Internals.pm', # finds $VERSION - EXE_FILES => ['bin/cpan2dist','bin/cpanp','bin/cpanp-run-perl'], - INSTALLDIRS => ( $] >= 5.009005 ? 'perl' : 'site' ), - AUTHOR => 'Jos Boumans ', - ABSTRACT => 'Ameliorated interface to the CPAN' -); diff --git a/cpan/CPANPLUS/bin/cpan2dist b/cpan/CPANPLUS/bin/cpan2dist deleted file mode 100644 index b4fadf552b..0000000000 --- a/cpan/CPANPLUS/bin/cpan2dist +++ /dev/null @@ -1,673 +0,0 @@ -#!/usr/bin/perl -w -use strict; -use CPANPLUS::Backend; -use CPANPLUS::Dist; -use CPANPLUS::Internals::Constants; -use Data::Dumper; -use Getopt::Long; -use File::Spec; -use File::Temp qw|tempfile|; -use File::Basename; -use Locale::Maketext::Simple Class => 'CPANPLUS', Style => 'gettext'; - -local $Data::Dumper::Indent = 1; - -use constant PREREQ_SKIP_CLASS => 'CPANPLUS::To::Dist::PREREQ_SKIP'; -use constant ALARM_CLASS => 'CPANPLUS::To::Dist::ALARM'; - -### print when you can -$|++; - -my $cb = CPANPLUS::Backend->new - or die loc("Could not create new CPANPLUS::Backend object"); -my $conf = $cb->configure_object; - -my %formats = map { $_ => $_ } CPANPLUS::Dist->dist_types; - -my $opts = {}; -GetOptions( $opts, - 'format=s', 'archive', - 'verbose!', 'force!', - 'skiptest!', 'keepsource!', - 'makefile!', 'buildprereq!', - 'help', 'flushcache', - 'ban=s@', 'banlist=s@', - 'ignore=s@', 'ignorelist=s@', - 'defaults', 'modulelist=s@', - 'logfile=s', 'timeout=s', - 'dist-opts=s%', 'set-config=s%', - 'default-banlist!', 'set-program=s%', - 'default-ignorelist!', 'edit-metafile!', - 'install!' - ); - -die usage() if exists $opts->{'help'}; - -### parse options -my $tarball = $opts->{'archive'} || 0; -my $keep = $opts->{'keepsource'} ? 1 : 0; -my $prereqbuild = exists $opts->{'buildprereq'} - ? $opts->{'buildprereq'} - : 0; -my $timeout = exists $opts->{'timeout'} - ? $opts->{'timeout'} - : 300; - -### use default answers? -unless ( $ENV{'PERL_MM_USE_DEFAULT'} ) { - $ENV{'PERL_MM_USE_DEFAULT'} = $opts->{'defaults'} ? 1 : 0; -} - -my $format; -### if provided, we go with the command line option, fall back to conf setting -{ $format = $opts->{'format'} || $conf->get_conf('dist_type'); - $conf->set_conf( dist_type => $format ); - - ### is this a valid format?? - die loc("Invalid format: " . ($format || "[NONE]") ) . usage() - unless $formats{$format}; - - ### any options to fix config entries - { my $set_conf = $opts->{'set-config'} || {}; - while( my($key,$val) = each %$set_conf ) { - $conf->set_conf( $key => $val ); - } - } - - ### any options to fix program entries - { my $set_prog = $opts->{'set-program'} || {}; - while( my($key,$val) = each %$set_prog ) { - $conf->set_program( $key => $val ); - } - } - - ### any other options passed - { my %map = ( verbose => 'verbose', - force => 'force', - skiptest => 'skiptest', - makefile => 'prefer_makefile' - ); - - ### set config options from arguments - while (my($key,$val) = each %map) { - my $bool = exists $opts->{$key} - ? $opts->{$key} - : $conf->get_conf($val); - $conf->set_conf( $val => $bool ); - } - } -} - -my @modules = @ARGV; -if( exists $opts->{'modulelist'} ) { - push @modules, map { parse_file( $_ ) } @{ $opts->{'modulelist'} }; -} - -die usage() unless @modules; - -### set up munge callback if requested -{ if( $opts->{'edit-metafile'} ) { - my $editor = $conf->get_program('editor'); - - if( $editor ) { - - ### register install callback ### - $cb->_register_callback( - name => 'munge_dist_metafile', - code => sub { - my $self = shift; - my $text = shift or return; - - my($fh,$file) = tempfile( UNLINK => 1 ); - - unless( print $fh $text ) { - warn "Could not print metafile information: $!"; - return; - } - - close $fh; - - system( $editor => $file ); - - my $cont = $cb->_get_file_contents( file => $file ); - - return $cont; - }, - ); - - } else { - warn "No editor configured. Can not edit metafiles!\n"; - } - } -} - -my $fh; -LOGFILE: { - if( my $file = $opts->{logfile} ) { - open $fh, ">$file" or ( - warn loc("Could not open '%1' for writing: %2", $file,$!), - last LOGFILE - ); - - warn "Logging to '$file'\n"; - - *STDERR = $fh; - *STDOUT = $fh; - } -} - -### reload indices if so desired -$cb->reload_indices() if $opts->{'flushcache'}; - -{ my @ban = exists $opts->{'ban'} - ? map { qr/$_/ } @{ $opts->{'ban'} } - : (); - - - if( exists $opts->{'banlist'} ) { - push @ban, map { parse_file( $_, 1 ) } @{ $opts->{'banlist'} }; - } - - push @ban, map { s/\s+//; $_ } - map { [split /\s*#\s*/]->[0] } - grep { /#/ } - map { split /\n/ } _default_ban_list() - if $opts->{'default-banlist'}; - - ### use our prereq install callback - $conf->set_conf( prereqs => PREREQ_ASK ); - - ### register install callback ### - $cb->_register_callback( - name => 'install_prerequisite', - code => \&__ask_about_install, - ); - - - ### check for ban patterns when handling prereqs - sub __ask_about_install { - - my $mod = shift or return; - my $prereq = shift or return; - - - ### die with an error object, so we can verify that - ### the die came from this location, and that it's an - ### 'acceptable' death - my $pat = ban_me( $prereq ); - die bless sub { loc("Module '%1' requires '%2' to be installed " . - "but found in your ban list (%3) -- skipping", - $mod->module, $prereq->module, $pat ) - }, PREREQ_SKIP_CLASS if $pat; - return 1; - } - - ### should we skip this module? - sub ban_me { - my $mod = shift; - - for my $pat ( @ban ) { - return $pat if $mod->module =~ /$pat/i; - } - return; - } -} - -### patterns to strip from prereq lists -{ my @ignore = exists $opts->{'ignore'} - ? map { qr/$_/ } @{ $opts->{'ignore'} } - : (); - - if( exists $opts->{'ignorelist'} ) { - push @ignore, map { parse_file( $_, 1 ) } @{ $opts->{'ignorelist'} }; - } - - push @ignore, map { s/\s+//; $_ } - map { [split /\s*#\s*/]->[0] } - grep { /#/ } - map { split /\n/ } _default_ignore_list() - if $opts->{'default-ignorelist'}; - - - ### register install callback ### - $cb->_register_callback( - name => 'filter_prereqs', - code => \&__filter_prereqs, - ); - - sub __filter_prereqs { - my $cb = shift; - my $href = shift; - - for my $name ( keys %$href ) { - my $obj = $cb->parse_module( module => $name ) or ( - warn "Cannot make a module object out of ". - "'$name' -- skipping\n", - next ); - - if( my $pat = ignore_me( $obj ) ) { - warn loc("'%1' found in your ignore list (%2) ". - "-- filtering it out\n", $name, $pat); - - delete $href->{ $name }; - } - } - - return $href; - } - - ### should we skip this module? - sub ignore_me { - my $mod = shift; - - for my $pat ( @ignore ) { - return $pat if $mod->module =~ /$pat/i; - return $pat if $mod->package_name =~ /$pat/i; - } - return; - } -} - - -my %done; -for my $name (@modules) { - - my $obj; - - ### is it a tarball? then we get it locally and transform it - ### and its dependencies into .debs - if( $tarball ) { - ### make sure we use an absolute path, so chdirs() dont - ### mess things up - $name = File::Spec->rel2abs( $name ); - - ### ENOTARBALL? - unless( -e $name ) { - warn loc("Archive '$name' does not exist"); - next; - } - - $obj = CPANPLUS::Module::Fake->new( - module => basename($name), - path => dirname($name), - package => basename($name), - ); - - ### if it's a traditional CPAN package, we can tidy - ### up the module name some - $obj->module( $obj->package_name ) if $obj->package_name; - - ### get the version from the package name - $obj->version( $obj->package_version || 0 ); - - ### set the location of the tarball - $obj->status->fetch($name); - - ### plain old cpan module? - } else { - - ### find the corresponding module object ### - $obj = $cb->parse_module( module => $name ) or ( - warn "Cannot make a module object out of ". - "'$name' -- skipping\n", - next ); - } - - ### you banned it? - if( my $pat = ban_me( $obj ) ) { - warn loc("'%1' found in your ban list (%2) -- skipping\n", - $obj->module, $pat ); - next; - } - - ### or just ignored it? - if( my $pat = ignore_me( $obj ) ) { - warn loc("'%1' found in your ignore list (%2) -- skipping\n", - $obj->module, $pat ); - next; - } - - - my $target = $opts->{'install'} ? 'install' : 'create'; - my $dist = eval { - local $SIG{ALRM} = sub { die bless {}, ALARM_CLASS } - if $timeout; - - alarm $timeout || 0; - - my $dist_opts = $opts->{'dist-opts'} || {}; - - my $rv = $obj->install( - prereq_target => $target, - target => $target, - keep_source => $keep, - prereq_build => $prereqbuild, - - ### any passed arbitrary options - %$dist_opts, - ); - - alarm 0; - - $rv; - }; - - ### set here again, in case the install dies - alarm 0; - - ### install failed due to a 'die' in our prereq skipper? - if( $@ and ref $@ and $@->isa( PREREQ_SKIP_CLASS ) ) { - warn loc("Dist creation of '%1' skipped: '%2'", - $obj->module, $@->() ); - next; - - } elsif ( $@ and ref $@ and $@->isa( ALARM_CLASS ) ) { - warn loc("\nDist creation of '%1' skipped, build time exceeded: ". - "%2 seconds\n", $obj->module, $timeout ); - next; - - ### died for some other reason? just report and skip - } elsif ( $@ ) { - warn loc("Dist creation of '%1' failed: '%2'", - $obj->module, $@ ); - next; - } - - ### we didn't get a dist object back? - unless ($dist and $obj->status->dist) { - warn loc("Unable to create '%1' dist of '%2'", $format, $obj->module); - next - } - - print "Created '$format' distribution for ", $obj->module, - " to:\n\t", $obj->status->dist->status->dist, "\n"; -} - - -sub parse_file { - my $file = shift or return; - my $qr = shift() ? 1 : 0; - - my $fh = OPEN_FILE->( $file ) or return; - - my @rv; - while( <$fh> ) { - chomp; - next if /^#/; # skip comments - next unless /\S/; # skip empty lines - s/^(\S+).*/$1/; # skip extra info - push @rv, $qr ? qr/$_/ : $_; # add pattern to the list - } - - return @rv; -} - -=head1 NAME - -cpan2dist - The CPANPLUS distribution creator - -=head1 DESCRIPTION - -This script will create distributions of C modules of the format -you specify, including its prerequisites. These packages can then be -installed using the corresponding package manager for the format. - -Note, you can also do this interactively from the default shell, -C. See the C documentation, -as well as the documentation of your format of choice for any format -specific documentation. - -=head1 USAGE - -=cut - -sub usage { - my $me = basename($0); - my $formats = join "\n", map { "\t\t$_" } sort keys %formats; - - my $usage = << '=cut'; -=pod - - Usage: cpan2dist [--format FMT] [OPTS] Mod::Name [Mod::Name, ...] - cpan2dist [--format FMT] [OPTS] --modulelist /tmp/mods.list - cpan2dist [--format FMT] [OPTS] --archive /tmp/dist [/tmp/dist2] - - Will create a distribution of type FMT of the modules - specified on the command line, and all their prerequisites. - - Can also create a distribution of type FMT from a local - archive and all of its prerequisites. - -=cut - - $usage .= qq[ - Possible formats are: -$formats - - You can install more formats from CPAN! - \n]; - - $usage .= << '=cut'; -=pod - -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 - --keepsource Keep sources after building distribution. Can be - negated by --nokeepsource. May not be supported - by all formats - --makefile Prefer Makefile.PL over Build.PL. Can be negated - using --nomakefile. Defaults to your config setting - --buildprereq Build packages of any prerequisites, even if they are - already uptodate on the local system. Can be negated - using --nobuildprereq. Defaults to false. - --archive Indicate that all modules listed are actually archives - --flushcache Update CPANPLUS' cache before commencing any operation - --defaults Instruct ExtUtils::MakeMaker and Module::Build to use - default answers during 'perl Makefile.PL' or 'perl - Build.PL' calls where possible - --edit-metafile Edit the distributions metafile(s) before the distribution - is built. Requires a configured editor. - - ### take argument: - --format Installer format to use (defaults to config setting) - --ban Patterns of module names to skip during installation, - case-insensitive (affects prerequisites too) - May be given multiple times - --banlist File containing patterns that could be given to --ban - Are appended to the ban list built up by --ban - May be given multiple times. - --ignore Patterns of modules to exclude from prereq list. Useful - for when a prereq listed by a CPAN module is resolved - in another way than from its corresponding CPAN package - (Match is done on both module name, and package name of - the package the module is in, case-insensitive) - --ignorelist File containing patterns that may be given to --ignore. - Are appended to the ban list built up by --ignore. - May be given multiple times. - --modulelist File containing a list of modules that should be built. - Are appended to the list of command line modules. - May be given multiple times. - --logfile File to log all output to. By default, all output goes - to the console. - --timeout The allowed time for buliding a distribution before - aborting. This is useful to terminate any build that - hang or happen to be interactive despite being told not - to be. Defaults to 300 seconds. To turn off, you can - set it to 0. - --set-config Change any options as specified in your config for this - invocation only. See CPANPLUS::Config for a list of - supported options. - --set-program Change any programs as specified in your config for this - invocation only. See CPANPLUS::Config for a list of - supported programs. - --dist-opts Arbitrary options passed along to the chosen installer - format's prepare()/create() routine. Please see the - documentation of the installer of your choice for - options it accepts. - - ### builtin lists - --default-banlist Use our builtin banlist. Works just like --ban - and --banlist, but with pre-set lists. See the - "Builtin Lists" section for details. - --default-ignorelist Use our builtin ignorelist. Works just like - --ignore and --ignorelist but with pre-set lists. - See the "Builtin Lists" section for details. - -Examples: - - ### build a debian package of DBI and its prerequisites, - ### don't bother running tests - cpan2dist --format CPANPLUS::Dist::Deb --buildprereq --skiptest DBI - - ### build a debian package of DBI and its 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. - cpan2dist --makefile --flushcache --archive /path/to/Cwd-1.0.tgz - - ### build a package from Net::FTP, but dont build any packages or - ### dependencies whose name match 'Foo', 'Bar' or any of the - ### patterns mentioned in /tmp/ban - cpan2dist --ban Foo --ban Bar --banlist /tmp/ban Net::FTP - - ### build a package from Net::FTP, but ignore its listed dependency - ### on IO::Socket, as it's shipped per default with the OS we're on - cpan2dist --ignore IO::Socket Net::FTP - - ### building all modules listed, plus their prerequisites - cpan2dist --ignorelist /tmp/modules.ignore --banlist /tmp/modules.ban - --modulelist /tmp/modules.list --buildprereq --flushcache - --makefile --defaults - - ### pass arbitrary options to the format's prepare()/create() routine - cpan2dist --dist-opts deb_version=3 --dist-opts prefix=corp - -=cut - - $usage .= qq[ -Builtin Lists: - - Ignore list:] . _default_ignore_list() . qq[ - Ban list:] . _default_ban_list(); - - ### strip the pod directives - $usage =~ s/=pod\n//g; - - return $usage; -} - -=pod - -=head1 Built-In Filter Lists - -Some modules you'd rather not package. Some because they -are part of core-perl and you dont want a new package. -Some because they won't build on your system. Some because -your package manager of choice already packages them for you. - -There may be a myriad of reasons. You can use the C<--ignore> -and C<--ban> options for this, but we provide some built-in -lists that catch common cases. You can use these built-in lists -if you like, or supply your own if need be. - -=head2 Built-In Ignore List - -=pod - -You can use this list of regexes to ignore modules matching -to be listed as prerequisites of a package. Particularly useful -if they are bundled with core-perl anyway and they have known -issues building. - -Toggle it by supplying the C<--default-ignorelist> option. - -=cut - -sub _default_ignore_list { - - my $list = << '=cut'; -=pod - - ^IO$ # Provided with core anyway - ^Cwd$ # Provided with core anyway - ^File::Spec # Provided with core anyway - ^Config$ # Perl's own config, not shipped separately - ^ExtUtils::MakeMaker$ # Shipped with perl, recent versions - # have bug 14721 (see rt.cpan.org) - ^ExtUtils::Install$ # Part of of EU::MM, same reason - -=cut - - return $list; -} - -=head2 Built-In Ban list - -You can use this list of regexes to disable building of these -modules altogether. - -Toggle it by supplying the C<--default-banlist> option. - -=cut - -sub _default_ban_list { - - my $list = << '=cut'; -=pod - - ^GD$ # Needs c libaries - ^Berk.*DB # DB packages require specific options & linking - ^DBD:: # DBD drivers require database files/headers - ^XML:: # XML modules usually require expat libraries - Apache # These usually require apache libraries - SSL # These usually require SSL certificates & libs - Image::Magick # Needs ImageMagick C libraries - Mail::ClamAV # Needs ClamAV C Libraries - ^Verilog # Needs Verilog C Libraries - ^Authen::PAM$ # Needs PAM C libraries & Headers - -=cut - - return $list; -} - -__END__ - -=head1 SEE ALSO - -L, L, L, -C - -=head1 BUG REPORTS - -Please report bugs or other issues to Ebug-cpanplus@rt.cpan.org. - -=head1 AUTHOR - -This module by Jos Boumans Ekane@cpan.orgE. - -=head1 COPYRIGHT - -The CPAN++ interface (of which this module is a part of) is copyright (c) -2001 - 2007, Jos Boumans Ekane@cpan.orgE. All rights reserved. - -This library is free software; you may redistribute and/or modify it -under the same terms as Perl itself. - -=cut - -# Local variables: -# c-indentation-style: bsd -# c-basic-offset: 4 -# indent-tabs-mode: nil -# End: -# vim: expandtab shiftwidth=4: diff --git a/cpan/CPANPLUS/bin/cpanp b/cpan/CPANPLUS/bin/cpanp deleted file mode 100644 index a493322cc2..0000000000 --- a/cpan/CPANPLUS/bin/cpanp +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/perl -# $File: //depot/cpanplus/dist/bin/cpanp $ -# $Revision: #8 $ $Change: 8345 $ $DateTime: 2003/10/05 19:25:48 $ - -use strict; -use vars '$VERSION'; - -use CPANPLUS; -$VERSION = CPANPLUS->VERSION; - -use CPANPLUS::Shell qw[Default]; -my $shell = CPANPLUS::Shell->new; - -### if we're given a command, run it; otherwise, open a shell. -if (@ARGV) { - ### take the command line arguments as a command - my $input = "@ARGV"; - ### if they said "--help", fix it up to work. - $input = 'h' if $input =~ /^\s*--?h(?:elp)?\s*$/i; - ### strip the leading dash - $input =~ s/^\s*-//; - ### pass the command line to the shell - ### exit with a useful return value on return - exit not $shell->dispatch_on_input(input => $input, noninteractive => 1); -} else { - ### open a shell for the user - $shell->shell(); -} - -=head1 NAME - -cpanp - The CPANPLUS launcher - -=head1 SYNOPSIS - -B - -B S<[-]B> S<[ --[B-]I