diff options
author | Steve Peters <steve@fisharerojo.org> | 2007-04-20 01:58:55 +0000 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2007-04-20 01:58:55 +0000 |
commit | dc053c64f31dbaaf949e0073647513fa42a4d569 (patch) | |
tree | 8f3308aa6e7d143454e44979abf09b00b4763b3e /lib/CPAN | |
parent | 183086bed615206c8d847db3e3e9fcf0cfd1ea53 (diff) | |
download | perl-dc053c64f31dbaaf949e0073647513fa42a4d569.tar.gz |
Upgrade to CPAN-1.91
p4raw-id: //depot/perl@30989
Diffstat (limited to 'lib/CPAN')
-rw-r--r-- | lib/CPAN/HandleConfig.pm | 8 | ||||
-rw-r--r-- | lib/CPAN/Tarzip.pm | 4 | ||||
-rw-r--r-- | lib/CPAN/t/10version.t | 11 |
3 files changed, 17 insertions, 6 deletions
diff --git a/lib/CPAN/HandleConfig.pm b/lib/CPAN/HandleConfig.pm index d4495eff6a..49a8a50d8e 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: 1566 $,4)/1000000 + 5.4; +$VERSION = sprintf "%.6f", substr(q$Rev: 1744 $,4)/1000000 + 5.4; %can = ( commit => "Commit changes to disk", @@ -298,8 +298,8 @@ EOF $fh->print(qq[$msg\$CPAN::Config = \{\n]); foreach (sort keys %$CPAN::Config) { unless (exists $keys{$_}) { - $CPAN::Frontend->mywarn("Dropping unknown config variable '$_'\n"); - delete $CPAN::Config->{$_}; + # do not drop them: forward compatibility! + $CPAN::Frontend->mywarn("Unknown config variable '$_'\n"); next; } $fh->print( @@ -685,7 +685,7 @@ sub prefs_lookup { use strict; use vars qw($AUTOLOAD $VERSION); - $VERSION = sprintf "%.2f", substr(q$Rev: 1566 $,4)/100; + $VERSION = sprintf "%.2f", substr(q$Rev: 1744 $,4)/100; # formerly CPAN::HandleConfig was known as CPAN::Config sub AUTOLOAD { diff --git a/lib/CPAN/Tarzip.pm b/lib/CPAN/Tarzip.pm index e637e3e027..88e8ef505f 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: 1525 $,4)/1000000 + 5.4; +$VERSION = sprintf "%.6f", substr(q$Rev: 1717 $,4)/1000000 + 5.4; # module is internal to CPAN.pm @ISA = qw(CPAN::Debug); @@ -13,7 +13,7 @@ $BUGHUNTING ||= 0; # released code must have turned off # it's ok if file doesn't exist, it just matters if it is .gz or .bz2 sub new { my($class,$file) = @_; - $CPAN::Frontend->mydie("new called without arg") unless defined $file; + $CPAN::Frontend->mydie("CPAN::Tarzip->new called without arg") unless defined $file; if (0) { # nonono, we get e.g. 01mailrc.txt uncompressed if only wget is available $CPAN::Frontend->mydie("file[$file] doesn't match /\\.(bz2|gz|zip|tgz)\$/") diff --git a/lib/CPAN/t/10version.t b/lib/CPAN/t/10version.t index c61ff0d91a..d1f8c3946d 100644 --- a/lib/CPAN/t/10version.t +++ b/lib/CPAN/t/10version.t @@ -21,6 +21,7 @@ print "1..$N\n"; my $has_sort_versions = eval { require Sort::Versions; 1 }; my $has_versionpm = eval { require version; 1 }; +my $has_perl_versionpm = eval { require Perl::Version; 1 }; while (@$D) { my($l,$r,$exp) = @{shift @$D}; my $res = CPAN::Version->vcmp($l,$r); @@ -44,6 +45,16 @@ while (@$D) { push @other, sprintf "v.pm: %d", $vres; } } + if ($has_perl_versionpm) { + local $^W; + my $vpack = "Perl::Version"; # hide the name from 5.004 + my $vres = eval { $vpack->new($l) cmp $vpack->new($r); }; + if ($@) { + push @other, "PV: $@"; + } elsif ($vres != $res) { + push @other, sprintf "PV: %d", $vres; + } + } my $other = @other ? " (".join("; ", @other).")" : ""; printf "ok %2d # %12s %12s %3d%s\n", $N-@$D, $l, $r, $res, $other; die "Panic" if CPAN::Version->vgt($l,$r) && CPAN::Version->vlt($l,$r); |