diff options
Diffstat (limited to 'lib/CPAN.pm')
-rw-r--r-- | lib/CPAN.pm | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/lib/CPAN.pm b/lib/CPAN.pm index 43df6c07b0..641ff36ff7 100644 --- a/lib/CPAN.pm +++ b/lib/CPAN.pm @@ -6,7 +6,7 @@ use vars qw{$Try_autoload $Frontend $Defaultsite }; #}; -$VERSION = '1.56_001'; +$VERSION = '1.56'; # $Id: CPAN.pm,v 1.303 2000/08/01 15:57:15 k Exp $ @@ -295,7 +295,7 @@ sub try_dot_al { $pkg =~ s|::|/|g; if (defined($name=$INC{"$pkg.pm"})) { - $name =~ s|^(.*)$pkg\.pm\z|$1auto/$pkg/$func.al|s; + $name =~ s|^(.*)$pkg\.pm$|$1auto/$pkg/$func.al|s; $name = undef unless (-r $name); } unless (defined $name) @@ -311,7 +311,7 @@ sub try_dot_al { *$autoload = sub {}; $ok = 1; } else { - if ($name =~ s{(\w{12,})\.al\z}{substr($1,0,11).".al"}e){ + if ($name =~ s{(\w{12,})\.al$}{substr($1,0,11).".al"}e){ eval {local $SIG{__DIE__};require $name}; } if ($@){ @@ -1319,7 +1319,7 @@ sub b { my($entry); for $entry ($dh->read) { next if -d MM->catdir($bdir,$entry); - next unless $entry =~ s/\.pm\z//; + next unless $entry =~ s/\.pm$//; $CPAN::META->instance('CPAN::Bundle',"Bundle::$entry"); } } @@ -1499,7 +1499,7 @@ sub _binary_extensions { | \\d*[24680]\\.\\d+ ) - \\.tar[._-]gz\z + \\.tar[._-]gz$ }; for $module ($self->expand('Module','/./')) { my $file = $module->cpan_file; @@ -2184,7 +2184,7 @@ sub hosteasy { utime $now, $now, $aslocal; # download time is more # important than upload time return $aslocal; - } elsif ($url !~ /\.gz\z/) { + } elsif ($url !~ /\.gz$/) { my $gzurl = "$url.gz"; $CPAN::Frontend->myprint("Fetching with LWP: $gzurl @@ -2221,7 +2221,7 @@ sub hosteasy { $Thesite = $i; return $aslocal; } - if ($aslocal !~ /\.gz\z/) { + if ($aslocal !~ /\.gz$/) { my $gz = "$aslocal.gz"; $CPAN::Frontend->myprint("Fetching with Net::FTP $url.gz @@ -2327,7 +2327,7 @@ Trying with "$funkyftp$src_switch" to get } $Thesite = $i; return $aslocal; - } elsif ($url !~ /\.gz\z/) { + } elsif ($url !~ /\.gz$/) { unlink $asl_ungz if -f $asl_ungz && -s _ == 0; my $gz = "$aslocal.gz"; @@ -3171,11 +3171,11 @@ sub get { $self->debug("Changed directory to tmp") if $CPAN::DEBUG; if (! $local_file) { Carp::croak "bad download, can't do anything :-(\n"; - } elsif ($local_file =~ /(\.tar\.(gz|Z)|\.tgz)\z/i){ + } elsif ($local_file =~ /(\.tar\.(gz|Z)|\.tgz)$/i){ $self->untar_me($local_file); - } elsif ( $local_file =~ /\.zip\z/i ) { + } elsif ( $local_file =~ /\.zip$/i ) { $self->unzip_me($local_file); - } elsif ( $local_file =~ /\.pm\.(gz|Z)\z/) { + } elsif ( $local_file =~ /\.pm\.(gz|Z)$/) { $self->pm2dir_me($local_file); } else { $self->{archived} = "NO"; @@ -3186,7 +3186,7 @@ sub get { # Let's check if the package has its own directory. my $dh = DirHandle->new(File::Spec->curdir) or Carp::croak("Couldn't opendir .: $!"); - my @readdir = grep $_ !~ /^\.\.?\z/s, $dh->read; ### MAC?? + my @readdir = grep $_ !~ /^\.\.?$/s, $dh->read; ### MAC?? $dh->close; my ($distdir,$packagedir); if (@readdir == 1 && -d $readdir[0]) { @@ -3282,7 +3282,7 @@ sub pm2dir_me { my($self,$local_file) = @_; $self->{archived} = "pm"; my $to = File::Basename::basename($local_file); - $to =~ s/\.(gz|Z)\z//; + $to =~ s/\.(gz|Z)$//; if (CPAN::Tarzip->gunzip($local_file,$to)) { $self->{unwrapped} = "YES"; } else { @@ -3345,7 +3345,7 @@ sub cvs_import { my $userid = $self->{CPAN_USERID}; my $cvs_dir = (split '/', $dir)[-1]; - $cvs_dir =~ s/-\d+[^-]+\z//; + $cvs_dir =~ s/-\d+[^-]+$//; my $cvs_root = $CPAN::Config->{cvsroot} || $ENV{CVSROOT}; my $cvs_site_perl = @@ -3442,7 +3442,7 @@ sub verifyMD5 { $lc_file = CPAN::FTP->localize("authors/id/@local", "$lc_want.gz",1); if ($lc_file) { - $lc_file =~ s/\.gz\z//; + $lc_file =~ s/\.gz$//; CPAN::Tarzip->gunzip("$lc_file.gz",$lc_file); } else { return; @@ -3575,7 +3575,7 @@ sub isa_perl { \d*[24680]\.\d+ ) \.tar[._-]gz - \z + $ }xs; "$1.$3"; } @@ -4290,7 +4290,7 @@ sub as_string { sub manpage_headline { my($self,$local_file) = @_; my(@local_file) = $local_file; - $local_file =~ s/\.pm\z/.pod/; + $local_file =~ s/\.pm$/.pod/; push @local_file, $local_file; my(@result,$locf); for $locf (@local_file) { @@ -4635,7 +4635,7 @@ sub untar { qq{Couldn\'t uncompress $file\n} ); } - $file =~ s/\.gz\z//; + $file =~ s/\.gz$//; $system = "$CPAN::Config->{tar} xvf $file"; $CPAN::Frontend->myprint(qq{Using Tar:$system:\n}); if (system($system)==0) { |