r3673 - in /packages/libclass-default-perl/trunk: ./ debian/
inc/Module/ inc/Module/Install/ lib/Class/ t/
gregoa-guest at users.alioth.debian.org
gregoa-guest at users.alioth.debian.org
Sat Sep 9 18:17:37 UTC 2006
Author: gregoa-guest
Date: Sat Sep 9 18:17:36 2006
New Revision: 3673
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=3673
Log:
* New upstream release.
* Add libtest-pod-perl to build dependencies.
* Set Standards-Version to 3.7.2 (no changes).
* Set debhelper compatibility level to 5 (no changes).
Removed:
packages/libclass-default-perl/trunk/inc/Module/AutoInstall.pm
packages/libclass-default-perl/trunk/inc/Module/Install/AutoInstall.pm
packages/libclass-default-perl/trunk/inc/Module/Install/Include.pm
Modified:
packages/libclass-default-perl/trunk/Changes
packages/libclass-default-perl/trunk/MANIFEST
packages/libclass-default-perl/trunk/META.yml
packages/libclass-default-perl/trunk/Makefile.PL
packages/libclass-default-perl/trunk/debian/changelog
packages/libclass-default-perl/trunk/debian/compat
packages/libclass-default-perl/trunk/debian/control
packages/libclass-default-perl/trunk/inc/Module/Install.pm
packages/libclass-default-perl/trunk/inc/Module/Install/Base.pm
packages/libclass-default-perl/trunk/inc/Module/Install/Can.pm
packages/libclass-default-perl/trunk/inc/Module/Install/Fetch.pm
packages/libclass-default-perl/trunk/inc/Module/Install/Makefile.pm
packages/libclass-default-perl/trunk/inc/Module/Install/Metadata.pm
packages/libclass-default-perl/trunk/inc/Module/Install/Win32.pm
packages/libclass-default-perl/trunk/inc/Module/Install/WriteAll.pm
packages/libclass-default-perl/trunk/lib/Class/Default.pm
packages/libclass-default-perl/trunk/t/01_compile.t
packages/libclass-default-perl/trunk/t/02_main.t
packages/libclass-default-perl/trunk/t/99_pod.t
Modified: packages/libclass-default-perl/trunk/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libclass-default-perl/trunk/Changes?rev=3673&op=diff
==============================================================================
--- packages/libclass-default-perl/trunk/Changes (original)
+++ packages/libclass-default-perl/trunk/Changes Sat Sep 9 18:17:36 2006
@@ -1,4 +1,9 @@
Revision history for Perl extension Class::Default.
+
+1.50 Mon 4 Sep 2006
+ - No functional change
+ - Upgrading to Module::Install 0.64
+ - Moving to 2 digit secondary version number
1.4 Fri 24 Feb 2006
- No functional changes.
Modified: packages/libclass-default-perl/trunk/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libclass-default-perl/trunk/MANIFEST?rev=3673&op=diff
==============================================================================
--- packages/libclass-default-perl/trunk/MANIFEST (original)
+++ packages/libclass-default-perl/trunk/MANIFEST Sat Sep 9 18:17:36 2006
@@ -1,11 +1,8 @@
Changes
-inc/Module/AutoInstall.pm
inc/Module/Install.pm
-inc/Module/Install/AutoInstall.pm
inc/Module/Install/Base.pm
inc/Module/Install/Can.pm
inc/Module/Install/Fetch.pm
-inc/Module/Install/Include.pm
inc/Module/Install/Makefile.pm
inc/Module/Install/Metadata.pm
inc/Module/Install/Win32.pm
Modified: packages/libclass-default-perl/trunk/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libclass-default-perl/trunk/META.yml?rev=3673&op=diff
==============================================================================
--- packages/libclass-default-perl/trunk/META.yml (original)
+++ packages/libclass-default-perl/trunk/META.yml Sat Sep 9 18:17:36 2006
@@ -1,17 +1,15 @@
-
+abstract: Static calls apply to a default instantiation
+author: Adam Kennedy <cpan at ali.as>
+build_requires:
+ Test::More: 0.47
+distribution_type: module
+generated_by: Module::Install version 0.63
+license: perl
+name: Class-Default
no_index:
directory:
- inc
- t
-generated_by: Module::Install version 0.57
-distribution_type: module
-version: 1.4
-name: Class-Default
-author: Adam Kennedy <cpan at ali.as>
-license: perl
-build_requires:
- Test::More: 0.47
- File::Spec: 0.82
requires:
perl: 5.005
-abstract: Static calls apply to a default instantiation
+version: 1.50
Modified: packages/libclass-default-perl/trunk/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libclass-default-perl/trunk/Makefile.PL?rev=3673&op=diff
==============================================================================
--- packages/libclass-default-perl/trunk/Makefile.PL (original)
+++ packages/libclass-default-perl/trunk/Makefile.PL Sat Sep 9 18:17:36 2006
@@ -2,9 +2,6 @@
name 'Class-Default';
all_from 'lib/Class/Default.pm';
+build_requires 'Test::More' => '0.47';
-build_requires 'Test::More' => '0.47';
-build_requires 'File::Spec' => '0.82';
-
-auto_install;
WriteAll;
Modified: packages/libclass-default-perl/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libclass-default-perl/trunk/debian/changelog?rev=3673&op=diff
==============================================================================
--- packages/libclass-default-perl/trunk/debian/changelog (original)
+++ packages/libclass-default-perl/trunk/debian/changelog Sat Sep 9 18:17:36 2006
@@ -1,3 +1,12 @@
+libclass-default-perl (1.50-1) unstable; urgency=low
+
+ * New upstream release.
+ * Add libtest-pod-perl to build dependencies.
+ * Set Standards-Version to 3.7.2 (no changes).
+ * Set debhelper compatibility level to 5 (no changes).
+
+ -- gregor herrmann <gregor+debian at comodo.priv.at> Sat, 9 Sep 2006 20:15:34 +0200
+
libclass-default-perl (1.4-1) unstable; urgency=low
* New upstream release
Modified: packages/libclass-default-perl/trunk/debian/compat
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libclass-default-perl/trunk/debian/compat?rev=3673&op=diff
==============================================================================
--- packages/libclass-default-perl/trunk/debian/compat (original)
+++ packages/libclass-default-perl/trunk/debian/compat Sat Sep 9 18:17:36 2006
@@ -1,1 +1,1 @@
-4
+5
Modified: packages/libclass-default-perl/trunk/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libclass-default-perl/trunk/debian/control?rev=3673&op=diff
==============================================================================
--- packages/libclass-default-perl/trunk/debian/control (original)
+++ packages/libclass-default-perl/trunk/debian/control Sat Sep 9 18:17:36 2006
@@ -1,11 +1,11 @@
Source: libclass-default-perl
Section: perl
Priority: optional
-Build-Depends: debhelper (>= 4.0.2)
-Build-Depends-Indep: perl (>= 5.8.0-7), libextutils-autoinstall-perl
+Build-Depends: debhelper (>= 5.0.0)
+Build-Depends-Indep: perl (>= 5.8.0-7), libextutils-autoinstall-perl, libtest-pod-perl
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Uploaders: Allard Hoeve <allard at byte.nl>, Gunnar Wolf <gwolf at debian.org>, Joachim Breitner <nomeata at debian.org>, Krzysztof Krzyzaniak (eloy) <eloy at debian.org>
-Standards-Version: 3.6.2
+Uploaders: Allard Hoeve <allard at byte.nl>, Gunnar Wolf <gwolf at debian.org>, Joachim Breitner <nomeata at debian.org>, Krzysztof Krzyzaniak (eloy) <eloy at debian.org>, gregor herrmann <gregor+debian at comodo.priv.at>
+Standards-Version: 3.7.2
Package: libclass-default-perl
Architecture: all
Modified: packages/libclass-default-perl/trunk/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libclass-default-perl/trunk/inc/Module/Install.pm?rev=3673&op=diff
==============================================================================
--- packages/libclass-default-perl/trunk/inc/Module/Install.pm (original)
+++ packages/libclass-default-perl/trunk/inc/Module/Install.pm Sat Sep 9 18:17:36 2006
@@ -1,5 +1,21 @@
-#line 1 "/tmp/cpan2/Class-Default/inc/Module/Install.pm - /usr/local/share/perl/5.8.4/Module/Install.pm"
+#line 1
package Module::Install;
+
+# For any maintainers:
+# The load order for Module::Install is a bit magic.
+# It goes something like this...
+#
+# IF ( host has Module::Install installed, creating author mode ) {
+# 1. Makefile.PL calls "use inc::Module::Install"
+# 2. $INC{inc/Module/Install.pm} set to installed version of inc::Module::Install
+# 3. The installed version of inc::Module::Install loads
+# 4. inc::Module::Install calls "require Module::Install"
+# 5. The ./inc/ version of Module::Install loads
+# } ELSE {
+# 1. Makefile.PL calls "use inc::Module::Install"
+# 2. $INC{inc/Module/Install.pm} set to ./inc/ version of Module::Install
+# 3. The ./inc/ version of Module::Install loads
+# }
use 5.004;
use strict 'vars';
@@ -12,11 +28,17 @@
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
- $VERSION = '0.57';
-}
-
-# inc::Module::Install must be loaded first
-unless ( $INC{join('/', inc => split(/::/, __PACKAGE__)).'.pm'} ) {
+ $VERSION = '0.63';
+}
+
+# Whether or not inc::Module::Install is actually loaded, the
+# $INC{inc/Module/Install.pm} is what will still get set as long as
+# the caller loaded module this in the documented manner.
+# If not set, the caller may NOT have loaded the bundled version, and thus
+# they may not have a MI version that works with the Makefile.PL. This would
+# result in false errors or unexpected behaviour. And we don't want that.
+my $file = join( '/', 'inc', split /::/, __PACKAGE__ ) . '.pm';
+unless ( $INC{$file} ) {
die <<"END_DIE";
Please invoke ${\__PACKAGE__} with:
@@ -25,6 +47,22 @@
not:
use ${\__PACKAGE__};
+
+END_DIE
+}
+
+# If the script that is loading Module::Install is from the future,
+# then make will detect this and cause it to re-run over and over
+# again. This is bad. Rather than taking action to touch it (which
+# is unreliable on some platforms and requires write permissions)
+# for now we should catch this and refuse to run.
+if ( -f $0 and (stat($0))[9] > time ) {
+ die << "END_DIE";
+Your installer $0 has a modification time in the future.
+
+This is known to create infinite loops in make.
+
+Please correct this, then run $0 again.
END_DIE
}
@@ -35,21 +73,20 @@
use FindBin;
*inc::Module::Install::VERSION = *VERSION;
- at inc::Module::Install::ISA = 'Module::Install';
+ at inc::Module::Install::ISA = __PACKAGE__;
sub autoload {
- my $self = shift;
- my $caller = $self->_caller;
- my $cwd = Cwd::cwd();
- my $sym = "$caller\::AUTOLOAD";
-
+ my $self = shift;
+ my $who = $self->_caller;
+ my $cwd = Cwd::cwd();
+ my $sym = "${who}::AUTOLOAD";
$sym->{$cwd} = sub {
my $pwd = Cwd::cwd();
if ( my $code = $sym->{$pwd} ) {
# delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
- $$sym =~ /([^:]+)$/ or die "Cannot autoload $caller - $sym";
+ $$sym =~ /([^:]+)$/ or die "Cannot autoload $who - $sym";
unshift @_, ($self, $1);
goto &{$self->can('call')} unless uc($1) eq $1;
};
@@ -58,18 +95,18 @@
sub import {
my $class = shift;
my $self = $class->new(@_);
+ my $who = $self->_caller;
unless ( -f $self->{file} ) {
require "$self->{path}/$self->{dispatch}.pm";
File::Path::mkpath("$self->{prefix}/$self->{author}");
- $self->{admin} =
- "$self->{name}::$self->{dispatch}"->new(_top => $self);
+ $self->{admin} = "$self->{name}::$self->{dispatch}"->new( _top => $self );
$self->{admin}->init;
@_ = ($class, _self => $self);
goto &{"$self->{name}::import"};
}
- *{$self->_caller . "::AUTOLOAD"} = $self->autoload;
+ *{"${who}::AUTOLOAD"} = $self->autoload;
$self->preload;
# Unregister loader and worker packages so subdirs can use them again
@@ -95,18 +132,18 @@
my %seen;
foreach my $obj ( @exts ) {
while (my ($method, $glob) = each %{ref($obj) . '::'}) {
- next unless defined *{$glob}{CODE};
+ next unless $obj->can($method);
next if $method =~ /^_/;
next if $method eq uc($method);
$seen{$method}++;
}
}
- my $caller = $self->_caller;
+ my $who = $self->_caller;
foreach my $name ( sort keys %seen ) {
- *{"${caller}::$name"} = sub {
- ${"${caller}::AUTOLOAD"} = "${caller}::$name";
- goto &{"${caller}::AUTOLOAD"};
+ *{"${who}::$name"} = sub {
+ ${"${who}::AUTOLOAD"} = "${who}::$name";
+ goto &{"${who}::AUTOLOAD"};
};
}
}
@@ -124,30 +161,26 @@
$args{dispatch} ||= 'Admin';
$args{prefix} ||= 'inc';
- $args{author} ||= '.author';
+ $args{author} ||= ($^O eq 'VMS' ? '_author' : '.author');
$args{bundle} ||= 'inc/BUNDLES';
$args{base} ||= $base_path;
-
$class =~ s/^\Q$args{prefix}\E:://;
$args{name} ||= $class;
$args{version} ||= $class->VERSION;
-
unless ( $args{path} ) {
$args{path} = $args{name};
$args{path} =~ s!::!/!g;
}
$args{file} ||= "$args{base}/$args{prefix}/$args{path}.pm";
- bless(\%args, $class);
+ bless( \%args, $class );
}
sub call {
- my $self = shift;
- my $method = shift;
- my $obj = $self->load($method) or return;
-
- unshift @_, $obj;
- goto &{$obj->can($method)};
+ my ($self, $method) = @_;
+ my $obj = $self->load($method) or return;
+ splice(@_, 0, 2, $obj);
+ goto &{$obj->can($method)};
}
sub load {
@@ -173,13 +206,13 @@
}
sub load_extensions {
- my ($self, $path, $top_obj) = @_;
-
- unshift @INC, $self->{prefix}
- unless grep { $_ eq $self->{prefix} } @INC;
-
- local @INC = ($path, @INC);
- foreach my $rv ($self->find_extensions($path)) {
+ my ($self, $path, $top) = @_;
+
+ unless ( grep { lc $_ eq lc $self->{prefix} } @INC ) {
+ unshift @INC, $self->{prefix};
+ }
+
+ foreach my $rv ( $self->find_extensions($path) ) {
my ($file, $pkg) = @{$rv};
next if $self->{pathnames}{$pkg};
@@ -190,7 +223,7 @@
next;
}
$self->{pathnames}{$pkg} = delete $INC{$file};
- push @{$self->{extensions}}, &{$new}($pkg, _top => $top_obj );
+ push @{$self->{extensions}}, &{$new}($pkg, _top => $top );
}
$self->{extensions} ||= [];
@@ -203,10 +236,32 @@
File::Find::find( sub {
my $file = $File::Find::name;
return unless $file =~ m!^\Q$path\E/(.+)\.pm\Z!is;
- return if $1 eq $self->{dispatch};
-
- $file = "$self->{path}/$1.pm";
- my $pkg = "$self->{name}::$1"; $pkg =~ s!/!::!g;
+ my $subpath = $1;
+ return if lc($subpath) eq lc($self->{dispatch});
+
+ $file = "$self->{path}/$subpath.pm";
+ my $pkg = "$self->{name}::$subpath";
+ $pkg =~ s!/!::!g;
+
+ # If we have a mixed-case package name, assume case has been preserved
+ # correctly. Otherwise, root through the file to locate the case-preserved
+ # version of the package name.
+ if ( $subpath eq lc($subpath) || $subpath eq uc($subpath) ) {
+ open PKGFILE, "<$subpath.pm" or die "find_extensions: Can't open $subpath.pm: $!";
+ my $in_pod = 0;
+ while ( <PKGFILE> ) {
+ $in_pod = 1 if /^=\w/;
+ $in_pod = 0 if /^=cut/;
+ next if ($in_pod || /^=cut/); # skip pod text
+ next if /^\s*#/; # and comments
+ if ( m/^\s*package\s+($pkg)\s*;/i ) {
+ $pkg = $1;
+ last;
+ }
+ }
+ close PKGFILE;
+ }
+
push @found, [ $file, $pkg ];
}, $path ) if -d $path;
@@ -214,15 +269,13 @@
}
sub _caller {
- my $depth = 0;
- my $caller = caller($depth);
-
- while ($caller eq __PACKAGE__) {
+ my $depth = 0;
+ my $call = caller($depth);
+ while ( $call eq __PACKAGE__ ) {
$depth++;
- $caller = caller($depth);
- }
-
- $caller;
+ $call = caller($depth);
+ }
+ return $call;
}
1;
Modified: packages/libclass-default-perl/trunk/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libclass-default-perl/trunk/inc/Module/Install/Base.pm?rev=3673&op=diff
==============================================================================
--- packages/libclass-default-perl/trunk/inc/Module/Install/Base.pm (original)
+++ packages/libclass-default-perl/trunk/inc/Module/Install/Base.pm Sat Sep 9 18:17:36 2006
@@ -1,7 +1,7 @@
-#line 1 "inc/Module/Install/Base.pm - /usr/local/share/perl/5.8.4/Module/Install/Base.pm"
+#line 1
package Module::Install::Base;
-$VERSION = '0.57';
+$VERSION = '0.63';
# Suspend handler for "redefined" warnings
BEGIN {
Modified: packages/libclass-default-perl/trunk/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libclass-default-perl/trunk/inc/Module/Install/Can.pm?rev=3673&op=diff
==============================================================================
--- packages/libclass-default-perl/trunk/inc/Module/Install/Can.pm (original)
+++ packages/libclass-default-perl/trunk/inc/Module/Install/Can.pm Sat Sep 9 18:17:36 2006
@@ -1,75 +1,82 @@
-#line 1 "inc/Module/Install/Can.pm - /usr/local/share/perl/5.8.4/Module/Install/Can.pm"
+#line 1
package Module::Install::Can;
+use strict;
use Module::Install::Base;
- at ISA = qw(Module::Install::Base);
-
-$VERSION = '0.57';
-
-use strict;
use Config ();
+### This adds a 5.005 Perl version dependency.
+### This is a bug and will be fixed.
+use File::Spec ();
use ExtUtils::MakeMaker ();
-# This may introduce a 5.005 dependency, or at the very least it may
-# not bootstrap properly under 5.004.
-use File::Spec ();
-
+use vars qw{$VERSION $ISCORE @ISA};
+BEGIN {
+ $VERSION = '0.63';
+ $ISCORE = 1;
+ @ISA = qw{Module::Install::Base};
+}
+
# check if we can load some module
+### Upgrade this to not have to load the module if possible
sub can_use {
- my ($self, $mod, $ver) = @_;
- $mod =~ s{::|\\}{/}g;
- $mod .= ".pm" unless $mod =~ /\.pm$/i;
+ my ($self, $mod, $ver) = @_;
+ $mod =~ s{::|\\}{/}g;
+ $mod .= '.pm' unless $mod =~ /\.pm$/i;
- my $pkg = $mod;
- $pkg =~ s{/}{::}g;
- $pkg =~ s{\.pm$}{}i;
+ my $pkg = $mod;
+ $pkg =~ s{/}{::}g;
+ $pkg =~ s{\.pm$}{}i;
- local $@;
- eval { require $mod; $pkg->VERSION($ver || 0); 1 };
+ local $@;
+ eval { require $mod; $pkg->VERSION($ver || 0); 1 };
}
# check if we can run some command
sub can_run {
- my ($self, $cmd) = @_;
+ my ($self, $cmd) = @_;
- my $_cmd = $cmd;
- return $_cmd if (-x $_cmd or $_cmd = MM->maybe_command($_cmd));
+ my $_cmd = $cmd;
+ return $_cmd if (-x $_cmd or $_cmd = MM->maybe_command($_cmd));
- for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
- my $abs = File::Spec->catfile($dir, $_[1]);
- return $abs if (-x $abs or $abs = MM->maybe_command($abs));
- }
+ for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
+ my $abs = File::Spec->catfile($dir, $_[1]);
+ return $abs if (-x $abs or $abs = MM->maybe_command($abs));
+ }
- return;
+ return;
}
+# can we locate a (the) C compiler
sub can_cc {
- my $self = shift;
- my @chunks = split(/ /, $Config::Config{cc}) or return;
+ my $self = shift;
+ my @chunks = split(/ /, $Config::Config{cc}) or return;
- # $Config{cc} may contain args; try to find out the program part
- while (@chunks) {
- return $self->can_run("@chunks") || (pop(@chunks), next);
- }
+ # $Config{cc} may contain args; try to find out the program part
+ while (@chunks) {
+ return $self->can_run("@chunks") || (pop(@chunks), next);
+ }
- return;
+ return;
}
# Fix Cygwin bug on maybe_command();
-if ($^O eq 'cygwin') {
- require ExtUtils::MM_Cygwin;
- require ExtUtils::MM_Win32;
- if ( ! defined(&ExtUtils::MM_Cygwin::maybe_command) ) {
- *ExtUtils::MM_Cygwin::maybe_command = sub {
- my ($self, $file) = @_;
- if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) {
- ExtUtils::MM_Win32->maybe_command($file);
- }
- else {
- ExtUtils::MM_Unix->maybe_command($file);
- }
- }
- }
+if ( $^O eq 'cygwin' ) {
+ require ExtUtils::MM_Cygwin;
+ require ExtUtils::MM_Win32;
+ if ( ! defined(&ExtUtils::MM_Cygwin::maybe_command) ) {
+ *ExtUtils::MM_Cygwin::maybe_command = sub {
+ my ($self, $file) = @_;
+ if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) {
+ ExtUtils::MM_Win32->maybe_command($file);
+ } else {
+ ExtUtils::MM_Unix->maybe_command($file);
+ }
+ }
+ }
}
1;
+
+__END__
+
+#line 157
Modified: packages/libclass-default-perl/trunk/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libclass-default-perl/trunk/inc/Module/Install/Fetch.pm?rev=3673&op=diff
==============================================================================
--- packages/libclass-default-perl/trunk/inc/Module/Install/Fetch.pm (original)
+++ packages/libclass-default-perl/trunk/inc/Module/Install/Fetch.pm Sat Sep 9 18:17:36 2006
@@ -1,10 +1,15 @@
-#line 1 "inc/Module/Install/Fetch.pm - /usr/local/share/perl/5.8.4/Module/Install/Fetch.pm"
+#line 1
package Module::Install::Fetch;
+use strict;
use Module::Install::Base;
- at ISA = qw(Module::Install::Base);
-$VERSION = '0.57';
+use vars qw{$VERSION $ISCORE @ISA};
+BEGIN {
+ $VERSION = '0.63';
+ $ISCORE = 1;
+ @ISA = qw{Module::Install::Base};
+}
sub get_file {
my ($self, %args) = @_;
@@ -55,14 +60,14 @@
chdir $dir; return;
}
- my @dialog = split(/\n/, << ".");
+ my @dialog = split(/\n/, <<"END_FTP");
open $host
user anonymous anonymous\@example.com
cd $path
binary
get $file $file
quit
-.
+END_FTP
foreach (@dialog) { $fh->print("$_\n") }
$fh->close;
} }
Modified: packages/libclass-default-perl/trunk/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libclass-default-perl/trunk/inc/Module/Install/Makefile.pm?rev=3673&op=diff
==============================================================================
--- packages/libclass-default-perl/trunk/inc/Module/Install/Makefile.pm (original)
+++ packages/libclass-default-perl/trunk/inc/Module/Install/Makefile.pm Sat Sep 9 18:17:36 2006
@@ -1,21 +1,37 @@
-#line 1 "inc/Module/Install/Makefile.pm - /usr/local/share/perl/5.8.4/Module/Install/Makefile.pm"
+#line 1
package Module::Install::Makefile;
use strict 'vars';
use Module::Install::Base;
use ExtUtils::MakeMaker ();
-use vars qw{$VERSION @ISA};
+use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.57';
+ $VERSION = '0.63';
+ $ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
sub Makefile { $_[0] }
+
+my %seen = ();
sub prompt {
shift;
- goto &ExtUtils::MakeMaker::prompt;
+
+ # Infinite loop protection
+ my @c = caller();
+ if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
+ die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
+ }
+
+ # In automated testing, always use defaults
+ if ( $ENV{AUTOMATED_TESTING} and ! $ENV{PERL_MM_USE_DEFAULT} ) {
+ local $ENV{PERL_MM_USE_DEFAULT} = 1;
+ goto &ExtUtils::MakeMaker::prompt;
+ } else {
+ goto &ExtUtils::MakeMaker::prompt;
+ }
}
sub makemaker_args {
@@ -53,6 +69,15 @@
);
}
+sub realclean_files {
+ my $self = shift;
+ my $realclean = $self->makemaker_args->{realclean} ||= {};
+ %$realclean = (
+ %$realclean,
+ FILES => join(' ', grep length, $realclean->{FILES}, @_),
+ );
+}
+
sub libs {
my $self = shift;
my $libs = ref $_[0] ? shift : [ shift ];
@@ -69,25 +94,26 @@
die "&Makefile->write() takes no arguments\n" if @_;
my $args = $self->makemaker_args;
-
$args->{DISTNAME} = $self->name;
- $args->{NAME} = $self->module_name || $self->name || $self->determine_NAME($args);
- $args->{VERSION} = $self->version || $self->determine_VERSION($args);
- $args->{NAME} =~ s/-/::/g;
-
- $args->{test} = {TESTS => $self->tests} if $self->tests;
-
+ $args->{NAME} = $self->module_name || $self->name || $self->determine_NAME($args);
+ $args->{VERSION} = $self->version || $self->determine_VERSION($args);
+ $args->{NAME} =~ s/-/::/g;
+ if ( $self->tests ) {
+ $args->{test} = { TESTS => $self->tests };
+ }
if ($] >= 5.005) {
$args->{ABSTRACT} = $self->abstract;
- $args->{AUTHOR} = $self->author;
+ $args->{AUTHOR} = $self->author;
}
if ( eval($ExtUtils::MakeMaker::VERSION) >= 6.10 ) {
$args->{NO_META} = 1;
}
- if ( eval($ExtUtils::MakeMaker::VERSION) > 6.17 ) {
- $args->{SIGN} = 1 if $self->sign;
- }
- delete $args->{SIGN} unless $self->is_admin;
+ if ( eval($ExtUtils::MakeMaker::VERSION) > 6.17 and $self->sign ) {
+ $args->{SIGN} = 1;
+ }
+ unless ( $self->is_admin ) {
+ delete $args->{SIGN};
+ }
# merge both kinds of requires into prereq_pm
my $prereq = ($args->{PREREQ_PM} ||= {});
@@ -104,49 +130,60 @@
}
}
- if (my $perl_version = $self->perl_version) {
+ if ( my $perl_version = $self->perl_version ) {
eval "use $perl_version; 1"
- or die "ERROR: perl: Version $] is installed, ".
- "but we need version >= $perl_version";
- }
-
- my %args = map {($_ => $args->{$_})} grep {defined($args->{$_})} keys %$args;
-
+ or die "ERROR: perl: Version $] is installed, "
+ . "but we need version >= $perl_version";
+ }
+
+ my %args = map { ( $_ => $args->{$_} ) } grep {defined($args->{$_})} keys %$args;
if ($self->admin->preop) {
$args{dist} = $self->admin->preop;
}
- ExtUtils::MakeMaker::WriteMakefile(%args);
-
- $self->fix_up_makefile();
+ my $mm = ExtUtils::MakeMaker::WriteMakefile(%args);
+ $self->fix_up_makefile($mm->{FIRST_MAKEFILE} || 'Makefile');
}
sub fix_up_makefile {
- my $self = shift;
- my $top_class = ref($self->_top) || '';
- my $top_version = $self->_top->VERSION || '';
+ my $self = shift;
+ my $makefile_name = shift;
+ my $top_class = ref($self->_top) || '';
+ my $top_version = $self->_top->VERSION || '';
my $preamble = $self->preamble
- ? "# Preamble by $top_class $top_version\n" . $self->preamble
- : '';
- my $postamble = "# Postamble by $top_class $top_version\n" .
- ($self->postamble || '');
+ ? "# Preamble by $top_class $top_version\n"
+ . $self->preamble
+ : '';
+ my $postamble = "# Postamble by $top_class $top_version\n"
+ . ($self->postamble || '');
local *MAKEFILE;
- open MAKEFILE, '< Makefile' or die $!;
+ open MAKEFILE, "< $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
my $makefile = do { local $/; <MAKEFILE> };
close MAKEFILE or die $!;
$makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /;
$makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g;
$makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g;
-
- $makefile =~ s/^(FULLPERL = .*)/$1 -Iinc/m;
- $makefile =~ s/^(PERL = .*)/$1 -Iinc/m;
-
- open MAKEFILE, '> Makefile' or die $!;
- print MAKEFILE "$preamble$makefile$postamble" or die $!;
- close MAKEFILE or die $!;
+ $makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m;
+ $makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m;
+
+ # Module::Install will never be used to build the Core Perl
+ # Sometimes PERL_LIB and PERL_ARCHLIB get written anyway, which breaks
+ # PREFIX/PERL5LIB, and thus, install_share. Blank them if they exist
+ $makefile =~ s/^PERL_LIB = .+/PERL_LIB =/m;
+ #$makefile =~ s/^PERL_ARCHLIB = .+/PERL_ARCHLIB =/m;
+
+ # Perl 5.005 mentions PERL_LIB explicitly, so we have to remove that as well.
+ $makefile =~ s/("?)-I\$\(PERL_LIB\)\1//g;
+
+ # XXX - This is currently unused; not sure if it breaks other MM-users
+ # $makefile =~ s/^pm_to_blib\s+:\s+/pm_to_blib :: /mg;
+
+ open MAKEFILE, "> $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
+ print MAKEFILE "$preamble$makefile$postamble" or die $!;
+ close MAKEFILE or die $!;
1;
}
@@ -168,4 +205,4 @@
__END__
-#line 295
+#line 334
Modified: packages/libclass-default-perl/trunk/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libclass-default-perl/trunk/inc/Module/Install/Metadata.pm?rev=3673&op=diff
==============================================================================
--- packages/libclass-default-perl/trunk/inc/Module/Install/Metadata.pm (original)
+++ packages/libclass-default-perl/trunk/inc/Module/Install/Metadata.pm Sat Sep 9 18:17:36 2006
@@ -1,12 +1,15 @@
-#line 1 "inc/Module/Install/Metadata.pm - /usr/local/share/perl/5.8.4/Module/Install/Metadata.pm"
+#line 1
package Module::Install::Metadata;
+use strict 'vars';
use Module::Install::Base;
- at ISA = qw{Module::Install::Base};
-
-$VERSION = '0.57';
-
-use strict 'vars';
+
+use vars qw{$VERSION $ISCORE @ISA};
+BEGIN {
+ $VERSION = '0.63';
+ $ISCORE = 1;
+ @ISA = qw{Module::Install::Base};
+}
my @scalar_keys = qw{
name module_name abstract author version license
@@ -120,9 +123,9 @@
require Module::Build;
my $build = Module::Build->new(
- dist_name => $self->{name},
- dist_version => $self->{version},
- license => $self->{license},
+ dist_name => $self->name,
+ dist_version => $self->version,
+ license => $self->license,
);
$self->provides(%{ $build->find_dist_packages || {} });
}
@@ -161,7 +164,9 @@
while ( my ( $name, $mods ) = splice( @_, 0, 2 ) ) {
$self->feature( $name, @$mods );
}
- return @{ $self->{values}{features} };
+ return $self->{values}->{features}
+ ? @{ $self->{values}->{features} }
+ : ();
}
sub no_index {
@@ -233,11 +238,13 @@
^
use \s*
v?
- ([\d\.]+)
+ ([\d_\.]+)
\s* ;
/ixms
)
{
+ my $v = $1;
+ $v =~ s{_}{}g;
$self->perl_version($1);
}
else {
Modified: packages/libclass-default-perl/trunk/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libclass-default-perl/trunk/inc/Module/Install/Win32.pm?rev=3673&op=diff
==============================================================================
--- packages/libclass-default-perl/trunk/inc/Module/Install/Win32.pm (original)
+++ packages/libclass-default-perl/trunk/inc/Module/Install/Win32.pm Sat Sep 9 18:17:36 2006
@@ -1,42 +1,45 @@
-#line 1 "inc/Module/Install/Win32.pm - /usr/local/share/perl/5.8.4/Module/Install/Win32.pm"
+#line 1
package Module::Install::Win32;
+use strict;
use Module::Install::Base;
- at ISA = qw(Module::Install::Base);
-$VERSION = '0.57';
-
-use strict;
+use vars qw{$VERSION $ISCORE @ISA};
+BEGIN {
+ $VERSION = '0.63';
+ $ISCORE = 1;
+ @ISA = qw{Module::Install::Base};
+}
# determine if the user needs nmake, and download it if needed
sub check_nmake {
- my $self = shift;
- $self->load('can_run');
- $self->load('get_file');
+ my $self = shift;
+ $self->load('can_run');
+ $self->load('get_file');
+
+ require Config;
+ return unless (
+ $^O eq 'MSWin32' and
+ $Config::Config{make} and
+ $Config::Config{make} =~ /^nmake\b/i and
+ ! $self->can_run('nmake')
+ );
- require Config;
- return unless (
- $Config::Config{make} and
- $Config::Config{make} =~ /^nmake\b/i and
- $^O eq 'MSWin32' and
- !$self->can_run('nmake')
- );
+ print "The required 'nmake' executable not found, fetching it...\n";
- print "The required 'nmake' executable not found, fetching it...\n";
+ require File::Basename;
+ my $rv = $self->get_file(
+ url => 'http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe',
+ ftp_url => 'ftp://ftp.microsoft.com/Softlib/MSLFILES/Nmake15.exe',
+ local_dir => File::Basename::dirname($^X),
+ size => 51928,
+ run => 'Nmake15.exe /o > nul',
+ check_for => 'Nmake.exe',
+ remove => 1,
+ );
- require File::Basename;
- my $rv = $self->get_file(
- url => 'http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe',
- ftp_url => 'ftp://ftp.microsoft.com/Softlib/MSLFILES/Nmake15.exe',
- local_dir => File::Basename::dirname($^X),
- size => 51928,
- run => 'Nmake15.exe /o > nul',
- check_for => 'Nmake.exe',
- remove => 1,
- );
-
- if (!$rv) {
- die << '.';
+ if (!$rv) {
+ die <<'END_MESSAGE';
-------------------------------------------------------------------------------
@@ -55,11 +58,8 @@
You may then resume the installation process described in README.
-------------------------------------------------------------------------------
-.
- }
+END_MESSAGE
+ }
}
1;
-
-__END__
-
Modified: packages/libclass-default-perl/trunk/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libclass-default-perl/trunk/inc/Module/Install/WriteAll.pm?rev=3673&op=diff
==============================================================================
--- packages/libclass-default-perl/trunk/inc/Module/Install/WriteAll.pm (original)
+++ packages/libclass-default-perl/trunk/inc/Module/Install/WriteAll.pm Sat Sep 9 18:17:36 2006
@@ -1,12 +1,15 @@
-#line 1 "inc/Module/Install/WriteAll.pm - /usr/local/share/perl/5.8.4/Module/Install/WriteAll.pm"
+#line 1
package Module::Install::WriteAll;
+use strict;
use Module::Install::Base;
- at ISA = qw(Module::Install::Base);
-$VERSION = '0.57';
-
-use strict;
+use vars qw{$VERSION $ISCORE @ISA};
+BEGIN {
+ $VERSION = '0.63';
+ $ISCORE = 1;
+ @ISA = qw{Module::Install::Base};
+}
sub WriteAll {
my $self = shift;
Modified: packages/libclass-default-perl/trunk/lib/Class/Default.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libclass-default-perl/trunk/lib/Class/Default.pm?rev=3673&op=diff
==============================================================================
--- packages/libclass-default-perl/trunk/lib/Class/Default.pm (original)
+++ packages/libclass-default-perl/trunk/lib/Class/Default.pm Sat Sep 9 18:17:36 2006
@@ -12,7 +12,7 @@
# Define globals
use vars qw{$VERSION %DEFAULT};
BEGIN {
- $VERSION = '1.4';
+ $VERSION = '1.50';
# Create the default object storage.
%DEFAULT = ();
Modified: packages/libclass-default-perl/trunk/t/01_compile.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libclass-default-perl/trunk/t/01_compile.t?rev=3673&op=diff
==============================================================================
--- packages/libclass-default-perl/trunk/t/01_compile.t (original)
+++ packages/libclass-default-perl/trunk/t/01_compile.t Sat Sep 9 18:17:36 2006
@@ -3,19 +3,9 @@
# Load testing for Class::Default
use strict;
-use lib ();
-use File::Spec::Functions ':ALL';
BEGIN {
- $| = 1;
- unless ( $ENV{HARNESS_ACTIVE} ) {
- require FindBin;
- $FindBin::Bin = $FindBin::Bin; # Avoid a warning
- chdir catdir( $FindBin::Bin, updir() );
- lib->import(
- catdir('blib', 'lib'),
- 'lib',
- );
- }
+ $| = 1;
+ $^W = 1;
}
use Test::More tests => 2;
Modified: packages/libclass-default-perl/trunk/t/02_main.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libclass-default-perl/trunk/t/02_main.t?rev=3673&op=diff
==============================================================================
--- packages/libclass-default-perl/trunk/t/02_main.t (original)
+++ packages/libclass-default-perl/trunk/t/02_main.t Sat Sep 9 18:17:36 2006
@@ -3,19 +3,9 @@
# Formal testing for Class::Default
use strict;
-use lib ();
-use File::Spec::Functions ':ALL';
BEGIN {
- $| = 1;
- unless ( $ENV{HARNESS_ACTIVE} ) {
- require FindBin;
- $FindBin::Bin = $FindBin::Bin; # Avoid a warning
- chdir catdir( $FindBin::Bin, updir() );
- lib->import(
- catdir('blib', 'lib'),
- 'lib',
- );
- }
+ $| = 1;
+ $^W = 1;
}
use Test::More tests => 20;
Modified: packages/libclass-default-perl/trunk/t/99_pod.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libclass-default-perl/trunk/t/99_pod.t?rev=3673&op=diff
==============================================================================
--- packages/libclass-default-perl/trunk/t/99_pod.t (original)
+++ packages/libclass-default-perl/trunk/t/99_pod.t Sat Sep 9 18:17:36 2006
@@ -22,6 +22,7 @@
}
# Continue as normal
+ push @$para, @words;
return &$begin(@_);
}
More information about the Pkg-perl-cvs-commits
mailing list