diff options
author | Steve Peters <steve@fisharerojo.org> | 2006-10-03 13:13:53 +0000 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2006-10-03 13:13:53 +0000 |
commit | 7d97ad34e1daa2105bc553c4c1183155427a25b3 (patch) | |
tree | fd47745a39fd7da79938b8047c45687bcbf5c831 /lib/CPAN | |
parent | 34f6948355c3813dae85d2f858b544061e7050ab (diff) | |
download | perl-7d97ad34e1daa2105bc553c4c1183155427a25b3.tar.gz |
Upgrade to CPAN-1.88_52
p4raw-id: //depot/perl@28920
Diffstat (limited to 'lib/CPAN')
-rw-r--r-- | lib/CPAN/Debug.pm | 37 | ||||
-rw-r--r-- | lib/CPAN/HandleConfig.pm | 7 | ||||
-rw-r--r-- | lib/CPAN/SIGNATURE | 30 | ||||
-rw-r--r-- | lib/CPAN/Tarzip.pm | 5 | ||||
-rw-r--r-- | lib/CPAN/Version.pm | 8 | ||||
-rw-r--r-- | lib/CPAN/t/10version.t | 8 |
6 files changed, 62 insertions, 33 deletions
diff --git a/lib/CPAN/Debug.pm b/lib/CPAN/Debug.pm index 211cac7d1c..239fb6b0ea 100644 --- a/lib/CPAN/Debug.pm +++ b/lib/CPAN/Debug.pm @@ -1,8 +1,9 @@ +# -*- Mode: cperl; coding: utf-8; cperl-indent-level: 4 -*- package CPAN::Debug; use strict; use vars qw($VERSION); -$VERSION = sprintf "%.6f", substr(q$Rev: 924 $,4)/1000000 + 5.4; +$VERSION = sprintf "%.6f", substr(q$Rev: 955 $,4)/1000000 + 5.4; # module is internal to CPAN.pm %CPAN::DEBUG = qw[ @@ -30,15 +31,24 @@ $CPAN::DEBUG ||= 0; #-> sub CPAN::Debug::debug ; sub debug { my($self,$arg) = @_; - my($caller,$func,$line,@rest) = caller(1); # caller(0) eg - # Complete, caller(1) - # eg readline - ($caller) = caller(0); - $caller =~ s/.*:://; - $arg = "" unless defined $arg; - pop @rest while @rest > 5; - my $rest = join ",", map { defined $_ ? $_ : "UNDEF" } @rest; - if ($CPAN::DEBUG{$caller} & $CPAN::DEBUG){ + + my @caller; + my $i = 0; + while () { + my(@c) = (caller($i))[0 .. ($i ? 3 : 2)]; + last unless defined $c[0]; + push @caller, \@c; + for (0,3) { + last if $_ > $#c; + $c[$_] =~ s/.*:://; + } + for (1) { + $c[$_] =~ s|.*/||; + } + last if ++$i>=3; + } + pop @caller; + if ($CPAN::DEBUG{$caller[0][0]} & $CPAN::DEBUG){ if ($arg and ref $arg) { eval { require Data::Dumper }; if ($@) { @@ -47,7 +57,12 @@ sub debug { $CPAN::Frontend->myprint(Data::Dumper::Dumper($arg)); } } else { - $CPAN::Frontend->myprint("Debug($caller:$func,$line,[$rest]): $arg\n"); + my $outer = ""; + local $" = ","; + if (@caller>1) { + $outer = ",[@{$caller[1]}]"; + } + $CPAN::Frontend->myprint("Debug(@{$caller[0]}$outer): $arg\n"); } } } diff --git a/lib/CPAN/HandleConfig.pm b/lib/CPAN/HandleConfig.pm index dbf2fb3ef5..a755254fa6 100644 --- a/lib/CPAN/HandleConfig.pm +++ b/lib/CPAN/HandleConfig.pm @@ -2,7 +2,7 @@ package CPAN::HandleConfig; use strict; use vars qw(%can %keys $VERSION); -$VERSION = sprintf "%.6f", substr(q$Rev: 916 $,4)/1000000 + 5.4; +$VERSION = sprintf "%.6f", substr(q$Rev: 958 $,4)/1000000 + 5.4; %can = ( commit => "Commit changes to disk", @@ -148,7 +148,8 @@ sub edit { $CPAN::Config->{$o} = { @args }; } else { $CPAN::Config->{$o} = $args[0] if defined $args[0]; - $self->prettyprint($o); + $self->prettyprint($o) + if exists $keys{$o} or defined $CPAN::Config->{$o}; return 1; } } @@ -580,7 +581,7 @@ package use strict; use vars qw($AUTOLOAD $VERSION); -$VERSION = sprintf "%.2f", substr(q$Rev: 916 $,4)/100; +$VERSION = sprintf "%.2f", substr(q$Rev: 958 $,4)/100; # formerly CPAN::HandleConfig was known as CPAN::Config sub AUTOLOAD { diff --git a/lib/CPAN/SIGNATURE b/lib/CPAN/SIGNATURE index 7f92b917fa..d7447f1516 100644 --- a/lib/CPAN/SIGNATURE +++ b/lib/CPAN/SIGNATURE @@ -14,35 +14,35 @@ not run its Makefile.PL or Build.PL. -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -SHA1 df3675a6257436492a9814131634527fdb70e5e7 ChangeLog +SHA1 6b31a7d5e222880c5d1f3b52758d46ed186e9784 ChangeLog SHA1 9b97524a7a91c815e46b19302a33829d3c26bbbf ChangeLog.old -SHA1 f39dfe02e639d88d99074720b0369015cb21c25d Changes +SHA1 d07abcd12ef7ee717592607dadd79fc64ab0cd15 Changes SHA1 a029ffa2f2252bb8914eb658666244710994d256 Changes.old SHA1 bcac708d887442591ac400c72a6be0629f416434 MANIFEST SHA1 159c257eb8d294fa6e0612fda7edcad948ab0362 MANIFEST.SKIP -SHA1 c2d3c4831d1fbbbb247e11cb60d0c7d97adfce85 META.yml +SHA1 41f58cb5008281bb0d6954a4131e1301f084d980 META.yml SHA1 f428cf9c8f7206fe115a1f42e13da5999452d075 Makefile.PL SHA1 37e858c51409a297ef5d3fb35dc57cd3b57f9a4d PAUSE2003.pub SHA1 af016003ad503ed078c5f8254521d13a3e0c494f PAUSE2005.pub -SHA1 f5960fd434593768d500b03f0abfa48d86d39914 README -SHA1 92c57d89defe2d11ca6bf4b922d90f5bb7e32f25 Todo +SHA1 07fc8068a27f362219008d279729e96eb5fe9d89 README +SHA1 76a7fd2eaec46c78f269da06766dc76b974b7339 Todo SHA1 efbe8e6882a2caa0d741b113959a706830ab5882 inc/Test/Builder.pm SHA1 ae1d68262bedc2475e2c6fd478d99b259b4fb109 inc/Test/More.pm -SHA1 3dd7f7792ab2f398d2aea3c051ab52d93bd603bc lib/CPAN.pm +SHA1 a6a24e27778fcc9dfb12c190e6369cfbd001f25b lib/CPAN.pm SHA1 e093af1fcd72420fe4bdc85a5bec2b92a301ab97 lib/CPAN/Admin.pm -SHA1 91ed95706f4e8cc36bb646467256de455007cd2d lib/CPAN/Debug.pm +SHA1 aa9e4d9384c88c55f9f457e2c2123242d7989406 lib/CPAN/Debug.pm SHA1 9af992904cb4445c306ecf8f7675478865f66c1e lib/CPAN/FirstTime.pm -SHA1 056a2a7fba83e3aa9c812048fe1757d808a43882 lib/CPAN/HandleConfig.pm +SHA1 c1170925e60ffcc14025b975997930a5f3eb6f7b lib/CPAN/HandleConfig.pm SHA1 17a1ad839531642ace9bf198bf52964c252f3318 lib/CPAN/Nox.pm SHA1 4992722f9e21d4c8f450cf96887b1e82f628b66c lib/CPAN/Queue.pm -SHA1 977be9f262b7a98699c00929af2eddf8793fd1d0 lib/CPAN/Tarzip.pm -SHA1 04a0f916787adc090aa4c1423419629370e9357f lib/CPAN/Version.pm +SHA1 fc6de4175a275a4c6791091f2ffcee2636a4a0f2 lib/CPAN/Tarzip.pm +SHA1 9498e9ed9da55227715a049692677b75e825adca lib/CPAN/Version.pm SHA1 fb08e07d8740ef36e8ab719c6a9b7e89c4fe674a scripts/cpan SHA1 2a3adebb8252dc893681d17460082c2e08aa144a t/00signature.t SHA1 215dace24b507de20011d36cbe2d16ddea78bcf3 t/01loadme.t SHA1 67e80e1cfc3530932de7743dd0c833b2c387609d t/02nox.t SHA1 deb594e0f60aa9c40706f117198ca202cb424b46 t/03pkgs.t -SHA1 ebdb653877d5c5e5a071fe9933b18f018cde3250 t/10version.t +SHA1 18368a653b17c7166f43686f8e315fd5e88bbcfa t/10version.t SHA1 325d8a2f72d59c4cd2400c72403c05cd614c3abc t/11mirroredby.t SHA1 7696ade95e8c4943a3e3e6a13c03c450cec8d030 t/12cpan.t SHA1 fa075e989a5923e73684d13d5e94baa0711bb360 t/30shell.coverage @@ -67,12 +67,12 @@ SHA1 541ac9311d4dbabe9bb99d770b221456798be688 t/CPAN/authors/id/A/AN/ANDK/NotInC SHA1 1aee1bed21f0e9755d693419e810ec75543eb0b7 t/CPAN/authors/id/A/AN/CHECKSUMS SHA1 1f3304f219bf0da4db6a60f638e11b61c2c2f4c0 t/CPAN/authors/id/A/CHECKSUMS SHA1 dfc900f5bfbc9683fa91977a1c7198222fbd4452 t/CPAN/authors/id/CHECKSUMS -SHA1 3287515f4ddfccd586ddd23a0929f0298a505d67 t/CPAN/modules/02packages.details.txt +SHA1 f73a986b44f38e126e4c8a50289d5537d80581e8 t/CPAN/modules/02packages.details.txt SHA1 f4c1a524de16347b37df6427ca01f98dd27f3c81 t/CPAN/modules/03modlist.data -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) -iD8DBQFFHkh17IA58KMXwV0RAhAOAKChWUfDPZJw1dyRBP5Rnn4ik05kVQCePcSo -MjOwJh97fgDAK9m6gDfYA/k= -=oz7x +iD8DBQFFIjIj7IA58KMXwV0RAidhAJ9x6UiFYhaKWBORJxsSvnMc6Jno/ACcClyR +tkNXFaGx9iPcX6f2Xfh4D7A= +=zuVm -----END PGP SIGNATURE----- diff --git a/lib/CPAN/Tarzip.pm b/lib/CPAN/Tarzip.pm index abd9ace095..684417c6b0 100644 --- a/lib/CPAN/Tarzip.pm +++ b/lib/CPAN/Tarzip.pm @@ -4,7 +4,7 @@ use strict; use vars qw($VERSION @ISA $BUGHUNTING); use CPAN::Debug; use File::Basename (); -$VERSION = sprintf "%.6f", substr(q$Rev: 858 $,4)/1000000 + 5.4; +$VERSION = sprintf "%.6f", substr(q$Rev: 956 $,4)/1000000 + 5.4; # module is internal to CPAN.pm @ISA = qw(CPAN::Debug); @@ -133,16 +133,19 @@ sub TIEHANDLE { my $fh = FileHandle->new($file) or die "Could not open file[$file]: $!"; binmode $fh; $self->{FH} = $fh; + $class->debug("via uncompressed FH"); } elsif ($CPAN::META->has_inst("Compress::Zlib")) { my $gz = Compress::Zlib::gzopen($file,"rb") or die "Could not gzopen $file"; $self->{GZ} = $gz; + $class->debug("via Compress::Zlib"); } else { my $gzip = CPAN::HandleConfig->safe_quote($self->{UNGZIPPRG}); my $pipe = "$gzip -dc $file |"; my $fh = FileHandle->new($pipe) or die "Could not pipe[$pipe]: $!"; binmode $fh; $self->{FH} = $fh; + $class->debug("via external gzip"); } $self; } diff --git a/lib/CPAN/Version.pm b/lib/CPAN/Version.pm index 04f3780926..68ab9c168e 100644 --- a/lib/CPAN/Version.pm +++ b/lib/CPAN/Version.pm @@ -2,7 +2,7 @@ package CPAN::Version; use strict; use vars qw($VERSION); -$VERSION = sprintf "%.6f", substr(q$Rev: 844 $,4)/1000000 + 5.4; +$VERSION = sprintf "%.6f", substr(q$Rev: 950 $,4)/1000000 + 5.4; # CPAN::Version::vcmp courtesy Jost Krieger sub vcmp { @@ -13,16 +13,22 @@ sub vcmp { return 0 if $l eq $r; # short circuit for quicker success for ($l,$r) { + s/_//g; + } + CPAN->debug("l[$l] r[$r]") if $CPAN::DEBUG; + for ($l,$r) { next unless tr/.// > 1; s/^v?/v/; 1 while s/\.0+(\d)/.$1/; } + CPAN->debug("l[$l] r[$r]") if $CPAN::DEBUG; if ($l=~/^v/ <=> $r=~/^v/) { for ($l,$r) { next if /^v/; $_ = $self->float2vv($_); } } + CPAN->debug("l[$l] r[$r]") if $CPAN::DEBUG; return ( ($l ne "undef") <=> ($r ne "undef") || diff --git a/lib/CPAN/t/10version.t b/lib/CPAN/t/10version.t index 2002ebe137..0827633df8 100644 --- a/lib/CPAN/t/10version.t +++ b/lib/CPAN/t/10version.t @@ -33,8 +33,10 @@ while (@$D) { if ($has_versionpm) { local $^W; my $vpack = "version"; # hide the name from 5.004 - my $vres = $vpack->new($l) cmp $vpack->new($r); - if ($vres != $res) { + my $vres = eval { $vpack->new($l) cmp $vpack->new($r); }; + if ($@) { + push @other, "v.pm: $@"; + } elsif ($vres != $res) { push @other, sprintf "v.pm: %d", $vres; } } @@ -61,6 +63,8 @@ VERSION VERSION 0 1.57_00 1.57 1 1.5700 1.57 1 1.57_01 1.57 1 +1.88_51 1.8801 1 +1.8_8_5_1 1.8801 1 0.2.10 0.2 -1 20000000.00 19990108 1 1.00 0.96 1 |