summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-11-05 16:28:09 +0000
committerNicholas Clark <nick@ccl4.org>2005-11-05 16:28:09 +0000
commitf3fe0ae60051c4c73dd9f21d0864f94a81c10245 (patch)
tree3d0c0d37b39c4752ac595854d79135cc8682a717 /lib
parentd9aa96a49c0aa1ba55eb980309a89c366d8f0c06 (diff)
downloadperl-f3fe0ae60051c4c73dd9f21d0864f94a81c10245.tar.gz
'[at]' should be '@'
Suck in CPAN/Nox.pm from CPAN, so that version.t passes. p4raw-id: //depot/perl@26018
Diffstat (limited to 'lib')
-rw-r--r--lib/CPAN.pm53
-rw-r--r--lib/CPAN/Nox.pm3
-rw-r--r--lib/CPAN/Version.pm10
-rw-r--r--lib/CPAN/t/version.t4
4 files changed, 35 insertions, 35 deletions
diff --git a/lib/CPAN.pm b/lib/CPAN.pm
index 08c22569f5..dd33fd9c71 100644
--- a/lib/CPAN.pm
+++ b/lib/CPAN.pm
@@ -67,9 +67,9 @@ use vars qw($VERSION @EXPORT $AUTOLOAD $DEBUG $META $HAS_USABLE $term
@CPAN::ISA = qw(CPAN::Debug Exporter);
@EXPORT = qw(
- autobundle bundle expand force notest get cvs_import
+ autobundle bundle expand force notest get cvs_import
install make readme recompile shell test clean
- perldoc recent
+ perldoc recent
);
#-> sub CPAN::AUTOLOAD ;
@@ -1289,7 +1289,7 @@ END
#-> sub CPAN::Config::load ;
sub load {
- my($self, %args) = [at]_;
+ my($self, %args) = @_;
$CPAN::Be_Silent++ if $args{be_silent};
my(@miss);
@@ -1681,8 +1681,8 @@ sub reload {
if ($command =~ /cpan/i) {
for my $f (qw(CPAN.pm CPAN/FirstTime.pm)) {
next unless $INC{$f};
- CPAN->debug("reloading the whole '$f' from '$INC{$f}' while pwd='$p
-wd'")
+ my $pwd = CPAN::anycwd();
+ CPAN->debug("reloading the whole '$f' from '$INC{$f}' while pwd='$pwd'")
if $CPAN::DEBUG;
my $fh = FileHandle->new($INC{$f});
local($/);
@@ -1805,11 +1805,11 @@ sub _u_r_common {
push @result, sprintf "%s %s\n", $module->id, $have;
} elsif ($what eq "r") {
push @result, $module->id;
- next MODULE if $seen{$file}++;
+ next MODULE if $seen{$file}++;
} elsif ($what eq "u") {
push @result, $module->id;
- next MODULE if $seen{$file}++;
- next MODULE if $file =~ /^Contact/;
+ next MODULE if $seen{$file}++;
+ next MODULE if $file =~ /^Contact/;
}
unless ($headerdone++){
$CPAN::Frontend->myprint("\n");
@@ -2166,7 +2166,7 @@ sub rematein {
shift;
my($meth,@some) = @_;
my @pragma;
- if ($meth =~ /^(force|notest)$/) {
+ while($meth =~ /^(force|notest)$/) {
push @pragma, $meth;
$meth = shift @some;
}
@@ -2279,7 +2279,7 @@ to find objects with matching identifiers.
#-> sub CPAN::Shell::recent ;
sub recent {
- my($self) = [at]_;
+ my($self) = @_;
CPAN::Distribution::_display_url( $self, $CPAN::Defaultrecent );
return;
@@ -3802,14 +3802,12 @@ sub ls {
my(@dl);
@dl = $self->dir_listing([$csf[0],"CHECKSUMS"], 0, 1);
unless (grep {$_->[2] eq $csf[1]} @dl) {
- $CPAN::Frontend->myprint("Directory $csf[1]/ does not exist\n") unless
-$silent ;
+ $CPAN::Frontend->myprint("Directory $csf[1]/ does not exist\n") unless $silent ;
return;
}
@dl = $self->dir_listing([@csf[0,1],"CHECKSUMS"], 0, 1);
unless (grep {$_->[2] eq $csf[2]} @dl) {
- $CPAN::Frontend->myprint("Directory $id/ does not exist\n") unless $sil
-ent;
+ $CPAN::Frontend->myprint("Directory $id/ does not exist\n") unless $silent;
return;
}
@dl = $self->dir_listing([@csf,"CHECKSUMS"], 1, 1);
@@ -3828,7 +3826,7 @@ sub dir_listing {
my $lc_want =
File::Spec->catfile($CPAN::Config->{keep_source_where},
"authors", "id", @$chksumfile);
-
+
my $fh;
# Purge and refetch old (pre-PGP) CHECKSUMS; they are a security
@@ -3839,6 +3837,7 @@ sub dir_listing {
my $line = <$fh>; close $fh;
unlink($lc_want) unless $line =~ /PGP/;
}
+
local($") = "/";
# connect "force" argument with "index_expire".
my $force = 0;
@@ -3999,13 +3998,13 @@ sub upload_date {
my $self = shift;
return $self->{UPLOAD_DATE} if exists $self->{UPLOAD_DATE};
my(@local_wanted) = split(/\//,$self->id);
- my $filename = pop [at]local_wanted;
- push [at]local_wanted, "CHECKSUMS";
+ my $filename = pop @local_wanted;
+ push @local_wanted, "CHECKSUMS";
my $author = CPAN::Shell->expand("Author",$self->cpan_userid);
return unless $author;
- my [at]dl = $author->dir_listing(\@local_wanted,0,$CPAN::Config->{show_upload_date});
- return unless [at]dl;
- my($dirent) = grep { $_->[2] eq $filename } [at]dl;
+ my @dl = $author->dir_listing(\@local_wanted,0,$CPAN::Config->{show_upload_date});
+ return unless @dl;
+ my($dirent) = grep { $_->[2] eq $filename } @dl;
# warn sprintf "dirent[%s]id[%s]", $dirent, $self->id;
return unless $dirent->[1];
return $self->{UPLOAD_DATE} = $dirent->[1];
@@ -4651,13 +4650,13 @@ sub force {
}
sub notest {
- my($self, $method) = [at]_;
+ my($self, $method) = @_;
# warn "XDEBUG: set notest for $self $method";
$self->{"notest"}++; # name should probably have been force_install
}
sub unnotest {
- my($self) = [at]_;
+ my($self) = @_;
# warn "XDEBUG: deleting notest";
delete $self->{'notest'};
}
@@ -5176,7 +5175,7 @@ sub dir {
#-> sub CPAN::Distribution::perldoc ;
sub perldoc {
- my($self) = [at]_;
+ my($self) = @_;
my($dist) = $self->id;
my $package = $self->called_for;
@@ -5186,7 +5185,7 @@ sub perldoc {
#-> sub CPAN::Distribution::_check_binary ;
sub _check_binary {
- my ($dist,$shell,$binary) = [at]_;
+ my ($dist,$shell,$binary) = @_;
my ($pid,$readme,$out);
$CPAN::Frontend->myprint(qq{ + _check_binary($binary)\n})
@@ -5207,7 +5206,7 @@ sub _check_binary {
#-> sub CPAN::Distribution::_display_url ;
sub _display_url {
- my($self,$url) = [at]_;
+ my($self,$url) = @_;
my($res,$saved_file,$pid,$readme,$out);
$CPAN::Frontend->myprint(qq{ + _display_url($url)\n})
@@ -5293,7 +5292,7 @@ with browser $browser
#-> sub CPAN::Distribution::_getsave_url ;
sub _getsave_url {
- my($dist, $shell, $url) = [at]_;
+ my($dist, $shell, $url) = @_;
$CPAN::Frontend->myprint(qq{ + _getsave_url($url)\n})
if $CPAN::DEBUG;
@@ -5949,7 +5948,7 @@ sub force {
}
sub notest {
- my($self) = [at]_;
+ my($self) = @_;
# warn "XDEBUG: set notest for Module";
$self->{'notest'}++;
}
diff --git a/lib/CPAN/Nox.pm b/lib/CPAN/Nox.pm
index 062e5ffa7e..89e47ec590 100644
--- a/lib/CPAN/Nox.pm
+++ b/lib/CPAN/Nox.pm
@@ -9,7 +9,8 @@ BEGIN{
use base 'Exporter';
use CPAN;
-$VERSION = "1.03";
+my $Id = q$Id: APC.pm 147 2005-08-09 04:25:25Z k $;
+our $VERSION = sprintf "%.3f", 2 + substr(q$Rev: 147 $,4)/1000;
$CPAN::META->has_inst('Digest::MD5','no');
$CPAN::META->has_inst('LWP','no');
$CPAN::META->has_inst('Compress::Zlib','no');
diff --git a/lib/CPAN/Version.pm b/lib/CPAN/Version.pm
index e12d27a5f4..68a4fec690 100644
--- a/lib/CPAN/Version.pm
+++ b/lib/CPAN/Version.pm
@@ -32,7 +32,7 @@ package CPAN::Version;
# CPAN::Version::vcmp courtesy Jost Krieger
sub vcmp {
- my($self,$l,$r) = [at]_;
+ my($self,$l,$r) = @_;
local($^W) = 0;
CPAN->debug("l[$l] r[$r]") if $CPAN::DEBUG;
@@ -64,19 +64,19 @@ sub vcmp {
}
sub vgt {
- my($self,$l,$r) = [at]_;
+ my($self,$l,$r) = @_;
$self->vcmp($l,$r) > 0;
}
sub vstring {
- my($self,$n) = [at]_;
+ my($self,$n) = @_;
$n =~ s/^v// or die "CPAN::Version::vstring() called with invalid arg [$n]";
pack "U*", split /\./, $n;
}
# vv => visible vstring
sub float2vv {
- my($self,$n) = [at]_;
+ my($self,$n) = @_;
my($rev) = int($n);
$rev ||= 0;
my($mantissa) = $n =~ /\.(\d{1,12})/; # limit to 12 digits to limit
@@ -94,7 +94,7 @@ sub float2vv {
}
sub readable {
- my($self,$n) = [at]_;
+ my($self,$n) = @_;
$n =~ /^([\w\-\+\.]+)/;
return $1 if defined $1 && length($1)>0;
diff --git a/lib/CPAN/t/version.t b/lib/CPAN/t/version.t
index 899a31d074..d313cec042 100644
--- a/lib/CPAN/t/version.t
+++ b/lib/CPAN/t/version.t
@@ -1,9 +1,9 @@
# test if our own version numbers meet expectations
-my [at]m = qw(CPAN CPAN::FirstTime CPAN::Nox);
+my @m = qw(CPAN CPAN::FirstTime CPAN::Nox);
use Test::More;
-plan(tests => scalar [at]m);
+plan(tests => scalar @m);
for my $m (@m) {
eval "require $m";