diff options
author | Steve Peters <steve@fisharerojo.org> | 2006-11-29 15:32:58 +0000 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2006-11-29 15:32:58 +0000 |
commit | be34b10d8abfd242c64e56c9cd82e1742b8e53b6 (patch) | |
tree | b13ffc9d28f0e1d9e96d621c5bc961751a6a3a8c /lib/CPAN | |
parent | 99ed40ffbc554c06cacea00522b9ea0d8190ec46 (diff) | |
download | perl-be34b10d8abfd242c64e56c9cd82e1742b8e53b6.tar.gz |
Upgrade to CPAN-1.88_63.
p4raw-id: //depot/perl@29421
Diffstat (limited to 'lib/CPAN')
-rw-r--r-- | lib/CPAN/HandleConfig.pm | 16 | ||||
-rw-r--r-- | lib/CPAN/Tarzip.pm | 19 |
2 files changed, 23 insertions, 12 deletions
diff --git a/lib/CPAN/HandleConfig.pm b/lib/CPAN/HandleConfig.pm index 4f4b5a3048..cdd276a3a3 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: 1264 $,4)/1000000 + 5.4; +$VERSION = sprintf "%.6f", substr(q$Rev: 1315 $,4)/1000000 + 5.4; %can = ( commit => "Commit changes to disk", @@ -85,6 +85,7 @@ $VERSION = sprintf "%.6f", substr(q$Rev: 1264 $,4)/1000000 + 5.4; my %prefssupport = map { $_ => 1 } ( "build_requires_install_policy", + "check_sigs", "make", "make_install_make_command", "prefer_installer", @@ -622,10 +623,17 @@ sub cpl { sub prefs_lookup { my($self,$distro,$what) = @_; + if ($prefssupport{$what}) { - return $distro->prefs->{cpanconfig}{$what} || $CPAN::Config->{$what}; + return $CPAN::Config->{$what} unless + $distro + and $distro->prefs + and $distro->prefs->{cpanconfig} + and defined $distro->prefs->{cpanconfig}{$what}; + return $distro->prefs->{cpanconfig}{$what}; } else { - warn "Warning: $what no yet officially supported for distroprefs, doing a normal lookup"; + $CPAN::Frontend->mywarn("Warning: $what not yet officially ". + "supported for distroprefs, doing a normal lookup"); return $CPAN::Config->{$what}; } } @@ -644,7 +652,7 @@ sub prefs_lookup { use strict; use vars qw($AUTOLOAD $VERSION); - $VERSION = sprintf "%.2f", substr(q$Rev: 1264 $,4)/100; + $VERSION = sprintf "%.2f", substr(q$Rev: 1315 $,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 684417c6b0..071c0b9136 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: 956 $,4)/1000000 + 5.4; +$VERSION = sprintf "%.6f", substr(q$Rev: 1301 $,4)/1000000 + 5.4; # module is internal to CPAN.pm @ISA = qw(CPAN::Debug); @@ -92,7 +92,8 @@ sub gunzip { sub gtest { my($self) = @_; return $self->{GTEST} if exists $self->{GTEST}; - my $read = $self->{FILE} or die; + defined $self->{FILE} or $CPAN::Frontend->mydie("gtest called but no FILE specified"); + my $read = $self->{FILE}; my $success; # After I had reread the documentation in zlib.h, I discovered that # uncompressed files do not lead to an gzerror (anymore?). @@ -130,19 +131,20 @@ sub TIEHANDLE { my $self = $class->new($file); if (0) { } elsif (!$self->gtest) { - my $fh = FileHandle->new($file) or die "Could not open file[$file]: $!"; + my $fh = FileHandle->new($file) + or $CPAN::Frontend->mydie("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"; + $CPAN::Frontend->mydie("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]: $!"; + my $fh = FileHandle->new($pipe) or $CPAN::Frontend->mydie("Could not pipe[$pipe]: $!"); binmode $fh; $self->{FH} = $fh; $class->debug("via external gzip"); @@ -168,7 +170,7 @@ sub READLINE { sub READ { my($self,$ref,$length,$offset) = @_; - die "read with offset not implemented" if defined $offset; + $CPAN::Frontend->mydie("read with offset not implemented") if defined $offset; if (exists $self->{GZ}) { my $gz = $self->{GZ}; my $byteread = $gz->gzread($$ref,$length);# 30eaf79e8b446ef52464b5422da328a8 @@ -306,7 +308,8 @@ sub unzip { my $zip = Archive::Zip->new(); my $status; $status = $zip->read($file); - die "Read of file[$file] failed\n" if $status != Archive::Zip::AZ_OK(); + $CPAN::Frontend->mydie("Read of file[$file] failed\n") + if $status != Archive::Zip::AZ_OK(); $CPAN::META->debug("Successfully read file[$file]") if $CPAN::DEBUG; my @members = $zip->members(); for my $member ( @members ) { @@ -317,7 +320,7 @@ sub unzip { } $status = $member->extractToFileNamed( $af ); $CPAN::META->debug("af[$af]status[$status]") if $CPAN::DEBUG; - die "Extracting of file[$af] from zipfile[$file] failed\n" if + $CPAN::Frontend->mydie("Extracting of file[$af] from zipfile[$file] failed\n") if $status != Archive::Zip::AZ_OK(); return if $CPAN::Signal; } |