summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/CPAN
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlperl/lib/CPAN')
-rw-r--r--Master/tlpkg/tlperl/lib/CPAN/Bundle.pm3
-rw-r--r--Master/tlpkg/tlperl/lib/CPAN/Debug.pm4
-rw-r--r--Master/tlpkg/tlperl/lib/CPAN/Distribution.pm121
-rw-r--r--Master/tlpkg/tlperl/lib/CPAN/FirstTime.pm6
-rw-r--r--Master/tlpkg/tlperl/lib/CPAN/HandleConfig.pm9
-rw-r--r--Master/tlpkg/tlperl/lib/CPAN/Index.pm2
-rw-r--r--Master/tlpkg/tlperl/lib/CPAN/Meta.pm6
-rw-r--r--Master/tlpkg/tlperl/lib/CPAN/Meta/Converter.pm4
-rw-r--r--Master/tlpkg/tlperl/lib/CPAN/Meta/Feature.pm4
-rw-r--r--Master/tlpkg/tlperl/lib/CPAN/Meta/History.pm4
-rw-r--r--Master/tlpkg/tlperl/lib/CPAN/Meta/Prereqs.pm6
-rw-r--r--Master/tlpkg/tlperl/lib/CPAN/Meta/Requirements.pm58
-rw-r--r--Master/tlpkg/tlperl/lib/CPAN/Meta/Spec.pm4
-rw-r--r--Master/tlpkg/tlperl/lib/CPAN/Meta/Validator.pm4
-rw-r--r--Master/tlpkg/tlperl/lib/CPAN/Meta/YAML.pm11
-rw-r--r--Master/tlpkg/tlperl/lib/CPAN/Mirrors.pm2
-rw-r--r--Master/tlpkg/tlperl/lib/CPAN/Nox.pm5
-rw-r--r--Master/tlpkg/tlperl/lib/CPAN/Queue.pm4
-rw-r--r--Master/tlpkg/tlperl/lib/CPAN/Tarzip.pm18
19 files changed, 187 insertions, 88 deletions
diff --git a/Master/tlpkg/tlperl/lib/CPAN/Bundle.pm b/Master/tlpkg/tlperl/lib/CPAN/Bundle.pm
index e7360f80485..92f7990ed3d 100644
--- a/Master/tlpkg/tlperl/lib/CPAN/Bundle.pm
+++ b/Master/tlpkg/tlperl/lib/CPAN/Bundle.pm
@@ -228,7 +228,8 @@ Going to $meth that.
$self->debug("type[$type] s[$s]") if $CPAN::DEBUG;
my $obj = $CPAN::META->instance($type,$s);
$obj->{reqtype} = $self->{reqtype};
- $obj->$meth();
+ # $obj->$meth();
+ CPAN::Queue->queue_item(qmod => $obj->id, reqtype => $self->{reqtype});
}
}
diff --git a/Master/tlpkg/tlperl/lib/CPAN/Debug.pm b/Master/tlpkg/tlperl/lib/CPAN/Debug.pm
index 23c4a3685b6..48e394bd419 100644
--- a/Master/tlpkg/tlperl/lib/CPAN/Debug.pm
+++ b/Master/tlpkg/tlperl/lib/CPAN/Debug.pm
@@ -71,6 +71,10 @@ sub debug {
__END__
+=head1 NAME
+
+CPAN::Debug - internal debugging for CPAN.pm
+
=head1 LICENSE
This program is free software; you can redistribute it and/or
diff --git a/Master/tlpkg/tlperl/lib/CPAN/Distribution.pm b/Master/tlpkg/tlperl/lib/CPAN/Distribution.pm
index 32648ecc1ff..690d6a063db 100644
--- a/Master/tlpkg/tlperl/lib/CPAN/Distribution.pm
+++ b/Master/tlpkg/tlperl/lib/CPAN/Distribution.pm
@@ -8,7 +8,7 @@ use CPAN::InfoObj;
use File::Path ();
@CPAN::Distribution::ISA = qw(CPAN::InfoObj);
use vars qw($VERSION);
-$VERSION = "1.9602";
+$VERSION = "2.00";
# Accessors
sub cpan_comment {
@@ -321,6 +321,10 @@ sub get {
);
return 1;
}
+ if (exists $self->{build_dir} && ! -d $self->{build_dir}){
+ # we have lost it.
+ $self->fforce(""); # no method to reset all phases but not set force (dodge)
+ }
# although we talk about 'force' we shall not test on
# force directly. New model of force tries to refrain from
@@ -516,8 +520,8 @@ See also http://rt.cpan.org/Ticket/Display.html?id=38932\n");
chmod 0777 &~ umask, $packagedir; # may fail
my $f;
for $f (@dirents) { # is already without "." and ".."
- my $from = File::Spec->catdir($from_dir,$f);
- my $to = File::Spec->catdir($packagedir,$f);
+ my $from = File::Spec->catfile($from_dir,$f);
+ my $to = File::Spec->catfile($packagedir,$f);
unless (File::Copy::move($from,$to)) {
my $err = $!;
$from = File::Spec->rel2abs($from);
@@ -604,7 +608,7 @@ sub pick_meta_file {
push @choices, 'META.yml' if $has_cm || $has_pcm;
for my $file ( grep { /$filter/ } @choices ) {
- my $path = File::Spec->catdir( $build_dir, $file );
+ my $path = File::Spec->catfile( $build_dir, $file );
return $path if -f $path
}
@@ -773,6 +777,7 @@ sub choose_MM_or_MB {
return $self;
}
+# see also reanimate_build_dir
#-> CPAN::Distribution::store_persistent_state
sub store_persistent_state {
my($self) = @_;
@@ -783,8 +788,8 @@ sub store_persistent_state {
"will not store persistent state\n");
return;
}
- unless (File::Spec->canonpath(File::Basename::dirname($dir))
- eq File::Spec->canonpath($CPAN::Config->{build_dir})) {
+ unless ( Cwd::realpath(File::Spec->catdir($dir, File::Spec->updir()) )
+ eq Cwd::realpath($CPAN::Config->{build_dir} ) ) {
$CPAN::Frontend->mywarnonce("Directory '$dir' not below $CPAN::Config->{build_dir}, ".
"will not store persistent state\n");
return;
@@ -1173,6 +1178,7 @@ sub untar_me {
if ($result) {
$self->{unwrapped} = CPAN::Distrostatus->new("YES");
} else {
+ # unfortunately we have no $@ here, Tarzip is using mydie which dies with "\n"
$self->{unwrapped} = CPAN::Distrostatus->new("NO -- untar failed");
}
}
@@ -1859,12 +1865,8 @@ is part of the perl-%s distribution. To install that, you need to run
return;
}
- my %env;
- while (my($k,$v) = each %ENV) {
- next unless defined $v;
- $env{$k} = $v;
- }
- local %ENV = %env;
+ local $ENV{PERL_AUTOINSTALL} = $ENV{PERL_AUTOINSTALL};
+ local $ENV{PERL_EXTUTILS_AUTOINSTALL} = $ENV{PERL_EXTUTILS_AUTOINSTALL};
if ($CPAN::Config->{prerequisites_policy} eq "follow") {
$ENV{PERL_AUTOINSTALL} ||= "--defaultdeps";
$ENV{PERL_EXTUTILS_AUTOINSTALL} ||= "--defaultdeps";
@@ -1874,6 +1876,8 @@ is part of the perl-%s distribution. To install that, you need to run
if ($self->prefs->{pl}) {
$pl_commandline = $self->prefs->{pl}{commandline};
}
+ local $ENV{PERL} = $ENV{PERL};
+ local $ENV{PERL5_CPAN_IS_EXECUTING} = $ENV{PERL5_CPAN_IS_EXECUTING};
if ($pl_commandline) {
$system = $pl_commandline;
$ENV{PERL} = $^X;
@@ -1881,7 +1885,11 @@ is part of the perl-%s distribution. To install that, you need to run
$system = $self->{'configure'};
} elsif ($self->{modulebuild}) {
my($perl) = $self->perl or die "Couldn\'t find executable perl\n";
- $system = "$perl Build.PL $CPAN::Config->{mbuildpl_arg}";
+ my $mbuildpl_arg = $self->_make_phase_arg("pl");
+ $system = sprintf("%s Build.PL%s",
+ $perl,
+ $mbuildpl_arg ? " $mbuildpl_arg" : "",
+ );
} else {
my($perl) = $self->perl or die "Couldn\'t find executable perl\n";
my $switch = "";
@@ -1902,11 +1910,7 @@ is part of the perl-%s distribution. To install that, you need to run
if ($self->prefs->{pl}) {
$pl_env = $self->prefs->{pl}{env};
}
- if ($pl_env) {
- for my $e (keys %$pl_env) {
- $ENV{$e} = $pl_env->{$e};
- }
- }
+ local @ENV{keys %$pl_env} = values %$pl_env if $pl_env;
if (exists $self->{writemakefile}) {
} else {
local($SIG{ALRM}) = sub { die "inactivity_timeout reached\n" };
@@ -1998,7 +2002,7 @@ is part of the perl-%s distribution. To install that, you need to run
return $self->goodbye("$system -- NOT OK");
}
}
- if (-f "Makefile" || -f "Build") {
+ if (-f "Makefile" || -f "Build" || ($^O eq 'VMS' && (-f 'descrip.mms' || -f 'Build.com'))) {
$self->{writemakefile} = CPAN::Distrostatus->new("YES");
delete $self->{make_clean}; # if cleaned before, enable next
} else {
@@ -2026,12 +2030,13 @@ is part of the perl-%s distribution. To install that, you need to run
if ($self->prefs->{make}) {
$make_commandline = $self->prefs->{make}{commandline};
}
+ local $ENV{PERL} = $ENV{PERL};
if ($make_commandline) {
$system = $make_commandline;
$ENV{PERL} = CPAN::find_perl();
} else {
if ($self->{modulebuild}) {
- unless (-f "Build") {
+ unless (-f "Build" || ($^O eq 'VMS' && -f 'Build.com')) {
my $cwd = CPAN::anycwd();
$CPAN::Frontend->mywarn("Alert: no Build file available for 'make $self->{id}'".
" in cwd[$cwd]. Danger, Will Robinson!\n");
@@ -2052,12 +2057,7 @@ is part of the perl-%s distribution. To install that, you need to run
if ($self->prefs->{make}) {
$make_env = $self->prefs->{make}{env};
}
- if ($make_env) { # overriding the local ENV of PL, not the outer
- # ENV, but unlikely to be a risk
- for my $e (keys %$make_env) {
- $ENV{$e} = $make_env->{$e};
- }
- }
+ local @ENV{keys %$make_env} = values %$make_env if $make_env;
my $expect_model = $self->_prefs_with_expect("make");
my $want_expect = 0;
if ( $expect_model && @{$expect_model->{talk}} ) {
@@ -2657,8 +2657,31 @@ sub unsat_prereq {
# one and is deprecated
if ( $available_file ) {
- if ( $inst_file && $available_file eq $inst_file && $nmo->inst_deprecated ) {
- # continue installing as a prereq
+ my $fulfills_all_version_rqs = $self->_fulfills_all_version_rqs
+ (
+ $need_module,
+ $available_file,
+ $available_version,
+ $need_version,
+ );
+ if (0) {
+ } elsif ( $inst_file
+ && $available_file eq $inst_file
+ && $nmo->inst_deprecated
+ ) {
+ # continue installing as a prereq. we really want that
+ # because the deprecated module may spit out warnings
+ # and third party did not know until today. Only one
+ # exception is OK, because CPANPLUS is special after
+ # all:
+ if ( $fulfills_all_version_rqs and
+ $nmo->id =~ /^CPANPLUS(?:::Dist::Build)$/
+ ) {
+ # here we have an available version that is good
+ # enough although deprecated (preventing circular
+ # loop CPANPLUS => CPANPLUS::Dist::Build RT#83042)
+ next NEED;
+ }
} elsif ($self->{reqtype} =~ /^(r|c)$/ && exists $prereq_pm->{requires}{$need_module} && $nmo && !$inst_file) {
# continue installing as a prereq; this may be a
# distro we already used when it was a build_requires
@@ -2674,9 +2697,7 @@ sub unsat_prereq {
}
}
else {
- next NEED if $self->_fulfills_all_version_rqs(
- $need_module,$available_file,$available_version,$need_version
- );
+ next NEED if $fulfills_all_version_rqs;
}
}
@@ -2760,13 +2781,13 @@ sub unsat_prereq {
# DMAKI/DateTime-Calendar-Chinese-0.05.tar.gz
# in 2007-03 for 'make install'
# and 2008-04: #30464 (for 'make test')
- $CPAN::Frontend->mywarn("Warning: Prerequisite ".
- "'$need_module => $need_version' ".
- "for '$selfid' already built ".
- "but the result looks suspicious. ".
- "Skipping another build attempt, ".
- "to prevent looping endlessly.\n"
- );
+ # $CPAN::Frontend->mywarn("Warning: Prerequisite ".
+ # "'$need_module => $need_version' ".
+ # "for '$selfid' already built ".
+ # "but the result looks suspicious. ".
+ # "Skipping another build attempt, ".
+ # "to prevent looping endlessly.\n"
+ # );
next NEED;
}
}
@@ -3205,7 +3226,7 @@ sub test {
$ENV{PERL} = CPAN::find_perl();
} elsif ($self->{modulebuild}) {
$system = sprintf "%s test", $self->_build_command();
- unless (-e "Build") {
+ unless (-e "Build" || ($^O eq 'VMS' && -e "Build.com")) {
my $id = $self->pretty_id;
$CPAN::Frontend->mywarn("Alert: no 'Build' file found while trying to test '$id'");
}
@@ -3218,21 +3239,11 @@ sub test {
$make_test_arg ? " $make_test_arg" : "",
);
my($tests_ok);
- my %env;
- while (my($k,$v) = each %ENV) {
- next unless defined $v;
- $env{$k} = $v;
- }
- local %ENV = %env;
my $test_env;
if ($self->prefs->{test}) {
$test_env = $self->prefs->{test}{env};
}
- if ($test_env) {
- for my $e (keys %$test_env) {
- $ENV{$e} = $test_env->{$e};
- }
- }
+ local @ENV{keys %$test_env} = values %$test_env if $test_env;
my $expect_model = $self->_prefs_with_expect("test");
my $want_expect = 0;
if ( $expect_model && @{$expect_model->{talk}} ) {
@@ -3554,10 +3565,13 @@ sub install {
$CPAN::Config->{mbuild_install_build_command} ?
$CPAN::Config->{mbuild_install_build_command} :
$self->_build_command();
- $system = sprintf("%s install %s",
+ my $install_directive = $^O eq 'VMS' ? '"install"' : 'install';
+ $system = sprintf("%s %s %s",
$mbuild_install_build_command,
+ $install_directive,
$CPAN::Config->{mbuild_install_arg},
);
+
} else {
my($make_install_make_command) =
CPAN::HandleConfig->prefs_lookup($self,
@@ -3569,7 +3583,7 @@ sub install {
);
}
- my($stderr) = $^O eq "MSWin32" ? "" : " 2>&1 ";
+ my($stderr) = $^O eq "MSWin32" || $^O eq 'VMS' ? "" : " 2>&1 ";
my $brip = CPAN::HandleConfig->prefs_lookup($self,
q{build_requires_install_policy});
$brip ||="ask/yes";
@@ -3883,6 +3897,9 @@ sub _build_command {
my($perl) = $self->perl or $CPAN::Frontend->mydie("Couldn't find executable perl\n");
return "$perl ./Build";
}
+ elsif ($^O eq 'VMS') {
+ return "$^X Build.com";
+ }
return "./Build";
}
diff --git a/Master/tlpkg/tlperl/lib/CPAN/FirstTime.pm b/Master/tlpkg/tlperl/lib/CPAN/FirstTime.pm
index 5030ef9b838..b099b04a110 100644
--- a/Master/tlpkg/tlperl/lib/CPAN/FirstTime.pm
+++ b/Master/tlpkg/tlperl/lib/CPAN/FirstTime.pm
@@ -10,7 +10,7 @@ use File::Path ();
use File::Spec ();
use CPAN::Mirrors ();
use vars qw($VERSION $auto_config);
-$VERSION = "5.5303";
+$VERSION = "5.5304";
=head1 NAME
@@ -1029,7 +1029,7 @@ sub init {
and $^O ne "MSWin32") {
# as long as Windows needs $self->_build_command, we cannot
# support sudo on windows :-)
- my $default = "./Build";
+ my $default = $^O eq 'VMS' ? '@Build.com' : "./Build";
if ( $CPAN::Config->{install_help} eq 'sudo' ) {
if ( find_exe('sudo') ) {
$default = "sudo $default";
@@ -1393,6 +1393,8 @@ sub _do_pick_mirrors {
my $_conf = 'n';
if ( $CPAN::META->has_usable("Net::Ping") && Net::Ping->VERSION gt '2.13') {
$_conf = prompt($prompts{auto_pick}, "yes");
+ } else {
+ prompt("Autoselection disabled due to Net::Ping missing or insufficient. Please press ENTER");
}
my @old_list = @{ $CPAN::Config->{urllist} };
if ( $_conf =~ /^y/i ) {
diff --git a/Master/tlpkg/tlperl/lib/CPAN/HandleConfig.pm b/Master/tlpkg/tlperl/lib/CPAN/HandleConfig.pm
index 09c42efee08..2978c3bde99 100644
--- a/Master/tlpkg/tlperl/lib/CPAN/HandleConfig.pm
+++ b/Master/tlpkg/tlperl/lib/CPAN/HandleConfig.pm
@@ -6,6 +6,12 @@ use File::Spec ();
use File::Basename ();
use Carp ();
+=head1 NAME
+
+CPAN::HandleConfig - internal configuration handling for CPAN.pm
+
+=cut
+
$VERSION = "5.5003"; # see also CPAN::Config::VERSION at end of file
%can = (
@@ -527,7 +533,8 @@ sub cpan_home_dir_candidates {
push @dirs, $ENV{USERPROFILE} if $ENV{USERPROFILE};
$CPAN::Config->{load_module_verbosity} = $old_v;
- @dirs = map { "$_/.cpan" } grep { defined } @dirs;
+ my $dotcpan = $^O eq 'VMS' ? '_cpan' : '.cpan';
+ @dirs = map { File::Spec->catdir($_, $dotcpan) } grep { defined } @dirs;
return wantarray ? @dirs : $dirs[0];
}
diff --git a/Master/tlpkg/tlperl/lib/CPAN/Index.pm b/Master/tlpkg/tlperl/lib/CPAN/Index.pm
index af98d7bf15c..c338cc7ec7b 100644
--- a/Master/tlpkg/tlperl/lib/CPAN/Index.pm
+++ b/Master/tlpkg/tlperl/lib/CPAN/Index.pm
@@ -126,7 +126,7 @@ sub reanimate_build_dir {
my @candidates = map { $_->[0] }
sort { $b->[1] <=> $a->[1] }
map { [ $_, -M File::Spec->catfile($d,$_) ] }
- grep {/\.yml$/} readdir $dh;
+ grep {/(.+)\.yml$/ && -d File::Spec->catfile($d,$1)} readdir $dh;
unless (@candidates) {
$CPAN::Frontend->myprint("Build_dir empty, nothing to restore\n");
return;
diff --git a/Master/tlpkg/tlperl/lib/CPAN/Meta.pm b/Master/tlpkg/tlperl/lib/CPAN/Meta.pm
index f8185983a42..19980bd4fc8 100644
--- a/Master/tlpkg/tlperl/lib/CPAN/Meta.pm
+++ b/Master/tlpkg/tlperl/lib/CPAN/Meta.pm
@@ -2,7 +2,7 @@ use 5.006;
use strict;
use warnings;
package CPAN::Meta;
-our $VERSION = '2.120630'; # VERSION
+our $VERSION = '2.120921'; # VERSION
use Carp qw(carp croak);
@@ -10,7 +10,7 @@ use CPAN::Meta::Feature;
use CPAN::Meta::Prereqs;
use CPAN::Meta::Converter;
use CPAN::Meta::Validator;
-use Parse::CPAN::Meta 1.4400 ();
+use Parse::CPAN::Meta 1.4403 ();
BEGIN { *_dclone = \&CPAN::Meta::Converter::_dclone }
@@ -346,7 +346,7 @@ CPAN::Meta - the distribution metadata for a CPAN dist
=head1 VERSION
-version 2.120630
+version 2.120921
=head1 SYNOPSIS
diff --git a/Master/tlpkg/tlperl/lib/CPAN/Meta/Converter.pm b/Master/tlpkg/tlperl/lib/CPAN/Meta/Converter.pm
index 0348e55504e..772d5792b12 100644
--- a/Master/tlpkg/tlperl/lib/CPAN/Meta/Converter.pm
+++ b/Master/tlpkg/tlperl/lib/CPAN/Meta/Converter.pm
@@ -2,7 +2,7 @@ use 5.006;
use strict;
use warnings;
package CPAN::Meta::Converter;
-our $VERSION = '2.120630'; # VERSION
+our $VERSION = '2.120921'; # VERSION
use CPAN::Meta::Validator;
@@ -1270,7 +1270,7 @@ CPAN::Meta::Converter - Convert CPAN distribution metadata structures
=head1 VERSION
-version 2.120630
+version 2.120921
=head1 SYNOPSIS
diff --git a/Master/tlpkg/tlperl/lib/CPAN/Meta/Feature.pm b/Master/tlpkg/tlperl/lib/CPAN/Meta/Feature.pm
index cd7689e9a67..31f4935b178 100644
--- a/Master/tlpkg/tlperl/lib/CPAN/Meta/Feature.pm
+++ b/Master/tlpkg/tlperl/lib/CPAN/Meta/Feature.pm
@@ -2,7 +2,7 @@ use 5.006;
use strict;
use warnings;
package CPAN::Meta::Feature;
-our $VERSION = '2.120630'; # VERSION
+our $VERSION = '2.120921'; # VERSION
use CPAN::Meta::Prereqs;
@@ -42,7 +42,7 @@ CPAN::Meta::Feature - an optional feature provided by a CPAN distribution
=head1 VERSION
-version 2.120630
+version 2.120921
=head1 DESCRIPTION
diff --git a/Master/tlpkg/tlperl/lib/CPAN/Meta/History.pm b/Master/tlpkg/tlperl/lib/CPAN/Meta/History.pm
index 001686e1b70..9e32d56ab5a 100644
--- a/Master/tlpkg/tlperl/lib/CPAN/Meta/History.pm
+++ b/Master/tlpkg/tlperl/lib/CPAN/Meta/History.pm
@@ -3,7 +3,7 @@ use 5.006;
use strict;
use warnings;
package CPAN::Meta::History;
-our $VERSION = '2.120630'; # VERSION
+our $VERSION = '2.120921'; # VERSION
1;
@@ -20,7 +20,7 @@ CPAN::Meta::History - history of CPAN Meta Spec changes
=head1 VERSION
-version 2.120630
+version 2.120921
=head1 DESCRIPTION
diff --git a/Master/tlpkg/tlperl/lib/CPAN/Meta/Prereqs.pm b/Master/tlpkg/tlperl/lib/CPAN/Meta/Prereqs.pm
index 640a299a01d..c1c58f0a6a6 100644
--- a/Master/tlpkg/tlperl/lib/CPAN/Meta/Prereqs.pm
+++ b/Master/tlpkg/tlperl/lib/CPAN/Meta/Prereqs.pm
@@ -2,12 +2,12 @@ use 5.006;
use strict;
use warnings;
package CPAN::Meta::Prereqs;
-our $VERSION = '2.120630'; # VERSION
+our $VERSION = '2.120921'; # VERSION
use Carp qw(confess);
use Scalar::Util qw(blessed);
-use CPAN::Meta::Requirements;
+use CPAN::Meta::Requirements 2.121;
sub __legal_phases { qw(configure build test runtime develop) }
@@ -149,7 +149,7 @@ CPAN::Meta::Prereqs - a set of distribution prerequisites by phase and type
=head1 VERSION
-version 2.120630
+version 2.120921
=head1 DESCRIPTION
diff --git a/Master/tlpkg/tlperl/lib/CPAN/Meta/Requirements.pm b/Master/tlpkg/tlperl/lib/CPAN/Meta/Requirements.pm
index 483a8448a5b..ee53a3c4570 100644
--- a/Master/tlpkg/tlperl/lib/CPAN/Meta/Requirements.pm
+++ b/Master/tlpkg/tlperl/lib/CPAN/Meta/Requirements.pm
@@ -1,7 +1,7 @@
use strict;
use warnings;
package CPAN::Meta::Requirements;
-our $VERSION = '2.120630'; # VERSION
+our $VERSION = '2.122'; # VERSION
# ABSTRACT: a set of version requirements for a CPAN dist
@@ -117,6 +117,14 @@ sub clear_requirement {
}
+sub requirements_for_module {
+ my ($self, $module) = @_;
+ my $entry = $self->__entry_for($module);
+ return unless $entry;
+ return $entry->as_string;
+}
+
+
sub required_modules { keys %{ $_[0]{requirements} } }
@@ -187,7 +195,12 @@ my %methods_for_op = (
sub add_string_requirement {
my ($self, $module, $req) = @_;
+ Carp::confess("No requirement string provided for $module")
+ unless defined $req && length $req;
+
my @parts = split qr{\s*,\s*}, $req;
+
+
for my $part (@parts) {
my ($op, $ver) = $part =~ m{\A\s*(==|>=|>|<=|<|!=)\s*(.*)\z};
@@ -209,7 +222,12 @@ sub from_string_hash {
my $self = $class->new;
for my $module (keys %$hash) {
- $self->add_string_requirement($module, $hash->{ $module });
+ my $req = $hash->{$module};
+ unless ( defined $req && length $req ) {
+ $req = 0;
+ Carp::carp("Undefined requirement for $module treated as '0'");
+ }
+ $self->add_string_requirement($module, $req);
}
return $self;
@@ -412,6 +430,7 @@ sub from_string_hash {
}
1;
+# vim: ts=2 sts=2 sw=2 et:
__END__
=pod
@@ -422,7 +441,7 @@ CPAN::Meta::Requirements - a set of version requirements for a CPAN dist
=head1 VERSION
-version 2.120630
+version 2.122
=head1 SYNOPSIS
@@ -553,6 +572,16 @@ This removes the requirement for a given module from the object.
This method returns the requirements object.
+=head2 requirements_for_module
+
+ $req->requirements_for_module( $module );
+
+This returns a string containing the version requirements for a given module in
+the format described in L<CPAN::Meta::Spec> or undef if the given module has no
+requirements. This should only be used for informational purposes such as error
+messages and should not be interpreted or used for comparison (see
+L</accepts_module> instead.)
+
=head2 required_modules
This method returns a list of all the modules for which requirements have been
@@ -634,13 +663,13 @@ L<CPAN::Meta::Spec/Version Ranges>. For example:
=item == 1.3
-=item ! 1.3
+=item != 1.3
=item > 1.3
=item < 1.3
-=item >= 1.3, ! 1.5, <= 2.0
+=item >= 1.3, != 1.5, <= 2.0
A version number without an operator is equivalent to specifying a minimum
(C<E<gt>=>). Extra whitespace is allowed.
@@ -655,6 +684,25 @@ This is an alternate constructor for a CPAN::Meta::Requirements object. It take
a hash of module names and version requirement strings and returns a new
CPAN::Meta::Requirements object.
+=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
+
+=head1 SUPPORT
+
+=head2 Bugs / Feature Requests
+
+Please report any bugs or feature requests through the issue tracker
+at L<http://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Meta-Requirements>.
+You will be notified automatically of any progress on your issue.
+
+=head2 Source Code
+
+This is open source software. The code repository is available for
+public review and contribution under the terms of the license.
+
+L<https://github.com/dagolden/cpan-meta-requirements>
+
+ git clone https://github.com/dagolden/cpan-meta-requirements.git
+
=head1 AUTHORS
=over 4
diff --git a/Master/tlpkg/tlperl/lib/CPAN/Meta/Spec.pm b/Master/tlpkg/tlperl/lib/CPAN/Meta/Spec.pm
index 07d32246411..9addfd43600 100644
--- a/Master/tlpkg/tlperl/lib/CPAN/Meta/Spec.pm
+++ b/Master/tlpkg/tlperl/lib/CPAN/Meta/Spec.pm
@@ -3,7 +3,7 @@ use 5.006;
use strict;
use warnings;
package CPAN::Meta::Spec;
-our $VERSION = '2.120630'; # VERSION
+our $VERSION = '2.120921'; # VERSION
1;
@@ -20,7 +20,7 @@ CPAN::Meta::Spec - specification for CPAN distribution metadata
=head1 VERSION
-version 2.120630
+version 2.120921
=head1 SYNOPSIS
diff --git a/Master/tlpkg/tlperl/lib/CPAN/Meta/Validator.pm b/Master/tlpkg/tlperl/lib/CPAN/Meta/Validator.pm
index 1bb53592275..e35f4c04ec7 100644
--- a/Master/tlpkg/tlperl/lib/CPAN/Meta/Validator.pm
+++ b/Master/tlpkg/tlperl/lib/CPAN/Meta/Validator.pm
@@ -2,7 +2,7 @@ use 5.006;
use strict;
use warnings;
package CPAN::Meta::Validator;
-our $VERSION = '2.120630'; # VERSION
+our $VERSION = '2.120921'; # VERSION
#--------------------------------------------------------------------------#
@@ -838,7 +838,7 @@ CPAN::Meta::Validator - validate CPAN distribution metadata structures
=head1 VERSION
-version 2.120630
+version 2.120921
=head1 SYNOPSIS
diff --git a/Master/tlpkg/tlperl/lib/CPAN/Meta/YAML.pm b/Master/tlpkg/tlperl/lib/CPAN/Meta/YAML.pm
index ba8a702f74d..a9f4d6d94cb 100644
--- a/Master/tlpkg/tlperl/lib/CPAN/Meta/YAML.pm
+++ b/Master/tlpkg/tlperl/lib/CPAN/Meta/YAML.pm
@@ -1,6 +1,6 @@
package CPAN::Meta::YAML;
{
- $CPAN::Meta::YAML::VERSION = '0.007';
+ $CPAN::Meta::YAML::VERSION = '0.008';
}
use strict;
@@ -614,8 +614,9 @@ BEGIN {
eval {
require Scalar::Util;
};
- if ( $@ or $Scalar::Util::VERSION < 1.18 ) {
- eval <<'END_PERL' if $@;
+ my $v = eval("$Scalar::Util::VERSION") || 0;
+ if ( $@ or $v < 1.18 ) {
+ eval <<'END_PERL';
# Scalar::Util failed to load or too old
sub refaddr {
my $pkg = ref($_[0]) or return undef;
@@ -647,7 +648,7 @@ CPAN::Meta::YAML - Read and write a subset of YAML for CPAN Meta files
=head1 VERSION
-version 0.007
+version 0.008
=head1 SYNOPSIS
@@ -689,7 +690,7 @@ L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=YAML-Tiny>
L<YAML::Tiny>, L<YAML>, L<YAML::XS>
-=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders
+=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
=head1 SUPPORT
diff --git a/Master/tlpkg/tlperl/lib/CPAN/Mirrors.pm b/Master/tlpkg/tlperl/lib/CPAN/Mirrors.pm
index daafc1dbaf1..38e0043d7a4 100644
--- a/Master/tlpkg/tlperl/lib/CPAN/Mirrors.pm
+++ b/Master/tlpkg/tlperl/lib/CPAN/Mirrors.pm
@@ -508,7 +508,7 @@ sub url {
sub ping {
my $self = shift;
- my $ping = Net::Ping->new("tcp",1);
+ my $ping = Net::Ping->new($^O eq 'VMS' ? 'icmp' : 'tcp', 1);
my ($proto) = $self->url =~ m{^([^:]+)};
my $port = $proto eq 'http' ? 80 : 21;
return unless $port;
diff --git a/Master/tlpkg/tlperl/lib/CPAN/Nox.pm b/Master/tlpkg/tlperl/lib/CPAN/Nox.pm
index 5fe5a25ae6e..f7ed4a38afb 100644
--- a/Master/tlpkg/tlperl/lib/CPAN/Nox.pm
+++ b/Master/tlpkg/tlperl/lib/CPAN/Nox.pm
@@ -6,10 +6,11 @@ BEGIN{
$CPAN::Suppress_readline=1 unless defined $CPAN::term;
}
-use base 'Exporter';
+use Exporter ();
+@CPAN::ISA = ('Exporter');
use CPAN;
-$VERSION = "5.50";
+$VERSION = "5.5001";
$CPAN::META->has_inst('Digest::MD5','no');
$CPAN::META->has_inst('LWP','no');
$CPAN::META->has_inst('Compress::Zlib','no');
diff --git a/Master/tlpkg/tlperl/lib/CPAN/Queue.pm b/Master/tlpkg/tlperl/lib/CPAN/Queue.pm
index e5d88ce2d83..1222b37ef61 100644
--- a/Master/tlpkg/tlperl/lib/CPAN/Queue.pm
+++ b/Master/tlpkg/tlperl/lib/CPAN/Queue.pm
@@ -201,6 +201,10 @@ sub reqtype_of {
__END__
+=head1 NAME
+
+CPAN::Queue - internal queue support for CPAN.pm
+
=head1 LICENSE
This program is free software; you can redistribute it and/or
diff --git a/Master/tlpkg/tlperl/lib/CPAN/Tarzip.pm b/Master/tlpkg/tlperl/lib/CPAN/Tarzip.pm
index 972df6ca06f..708a5794f34 100644
--- a/Master/tlpkg/tlperl/lib/CPAN/Tarzip.pm
+++ b/Master/tlpkg/tlperl/lib/CPAN/Tarzip.pm
@@ -343,10 +343,20 @@ Can't continue cutting file '$file'.
}
$system = qq{$tarcommand x${tar_verb}f "$file"};
$CPAN::Frontend->myprint(qq{Using Tar:$system:\n});
- if (system($system)==0) {
+ my $ret = system($system);
+ if ($ret==0) {
$CPAN::Frontend->myprint(qq{Untarred $file successfully\n});
} else {
- $CPAN::Frontend->mydie(qq{Couldn\'t untar $file\n});
+ if ($? == -1) {
+ $CPAN::Frontend->mydie(sprintf qq{Couldn\'t untar %s: '%s'\n},
+ $file, $!);
+ } elsif ($? & 127) {
+ $CPAN::Frontend->mydie(sprintf qq{Couldn\'t untar %s: child died with signal %d, %s coredump\n},
+ $file, ($? & 127), ($? & 128) ? 'with' : 'without');
+ } else {
+ $CPAN::Frontend->mydie(sprintf qq{Couldn\'t untar %s: child exited with value %d\n},
+ $file, $? >> 8);
+ }
}
return 1;
} else {
@@ -450,6 +460,10 @@ END
__END__
+=head1 NAME
+
+CPAN::Tarzip - internal handling of tar archives for CPAN.pm
+
=head1 LICENSE
This program is free software; you can redistribute it and/or