r54091 - in /branches/upstream/liblocal-lib-perl/current: Changes MANIFEST META.yml Makefile.PL eg/ lib/local/lib.pm t/coderefs_in_inc.t t/de-dup.t
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Thu Mar 11 14:54:21 UTC 2010
Author: jawnsy-guest
Date: Thu Mar 11 14:54:12 2010
New Revision: 54091
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=54091
Log:
[svn-upgrade] Integrating new upstream version, liblocal-lib-perl (1.005001)
Added:
branches/upstream/liblocal-lib-perl/current/t/coderefs_in_inc.t
branches/upstream/liblocal-lib-perl/current/t/de-dup.t
Removed:
branches/upstream/liblocal-lib-perl/current/eg/
Modified:
branches/upstream/liblocal-lib-perl/current/Changes
branches/upstream/liblocal-lib-perl/current/MANIFEST
branches/upstream/liblocal-lib-perl/current/META.yml
branches/upstream/liblocal-lib-perl/current/Makefile.PL
branches/upstream/liblocal-lib-perl/current/lib/local/lib.pm
Modified: branches/upstream/liblocal-lib-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/Changes?rev=54091&op=diff
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/Changes (original)
+++ branches/upstream/liblocal-lib-perl/current/Changes Thu Mar 11 14:54:12 2010
@@ -1,4 +1,21 @@
Revision history for local::lib
+
+1.005001 2010-03-10
+
+ - I am an idiot.
+
+1.005000 2010-03-10
+
+ - More robust handling of running new toolchains on older perls. This
+ should sort out issues users have with bootstrapping on e.g. Solaris
+ and other traditional Unices. In addition, try to find a GNU tar
+ capable of dealing with @LongLink so bootstrapping doesn't fail.
+
+ - Warnings for missing PATH/PERL5LIB (as when not running interactively)
+ silenced by a patch from Marco Emilio Poleggi.
+
+ - Start of better docs for C<--self-contained> thanks to
+ markstos at cpan.org.
1.004009 2009-11-07
Modified: branches/upstream/liblocal-lib-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/MANIFEST?rev=54091&op=diff
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/MANIFEST (original)
+++ branches/upstream/liblocal-lib-perl/current/MANIFEST Thu Mar 11 14:54:12 2010
@@ -15,10 +15,11 @@
MANIFEST This list of files
META.yml
t/classmethod.t
+t/coderefs_in_inc.t
+t/de-dup.t
t/dist/EUMM/lib/EUMM.pm
t/dist/EUMM/Makefile.PL
t/dist/MB/Build.PL
t/dist/MB/lib/MB.pm
t/install.t
t/pipeline.t
-eg/scripted_install.pl
Modified: branches/upstream/liblocal-lib-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/META.yml?rev=54091&op=diff
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/META.yml (original)
+++ branches/upstream/liblocal-lib-perl/current/META.yml Thu Mar 11 14:54:12 2010
@@ -19,7 +19,7 @@
- t
- xt
requires:
- CPAN: 1.80
+ CPAN: 1.82
ExtUtils::CBuilder: 0
ExtUtils::Install: 1.43
ExtUtils::MakeMaker: 6.31
@@ -28,4 +28,4 @@
perl: 5.8.1
resources:
license: http://dev.perl.org/licenses/
-version: 1.004009
+version: 1.005001
Modified: branches/upstream/liblocal-lib-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/Makefile.PL?rev=54091&op=diff
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/Makefile.PL (original)
+++ branches/upstream/liblocal-lib-perl/current/Makefile.PL Thu Mar 11 14:54:12 2010
@@ -4,6 +4,37 @@
use Cwd;
use vars qw($bootstrapping $bootstrapping_args $no_manpages);
use Config;
+
+# Solaris (and possibly other Unices) have a tar in /usr/bin that, among
+# other things, does not understand @LongLink. This can cause
+# extraction to look like it succeeded, but it actually failed (because
+# the error message for the @LongLink failure scrolled offscreen).
+# Therefore, given the fact that GNU tar is the most widespread tar available,
+# and it actually supports the feature we want (I'd bet it originated in GNU
+# tar, but I digress), we'll look for GNU tar. If we don't find it, and the
+# user hasn't pointed us to a suitable tar, we'll bomb and tell them what to
+# do.
+
+my $have_gtar = 0;
+if($^O eq 'solaris') {
+ $have_gtar = 0;
+ for my $env_path (split /:/, $ENV{PATH}) {
+ $have_gtar = 1 if -x File::Spec->catfile($env_path, 'gtar');
+ }
+} else {
+ $have_gtar = 1;
+}
+if(exists $ENV{PERL_LL_TAR}) {
+ $have_gtar ||= -x $ENV{PERL_LL_TAR};
+}
+
+die <<'DEATH' unless $have_gtar;
+You are using Solaris (or another traditional Unix) that does not provide a sane
+tar, capable of dealing with the output of GNU tar. Please either set the
+PERL_LL_TAR environment variable to the location of a version of tar that
+understands the @LongLink convention or put a binary named gtar somewhere on
+your PATH.
+DEATH
my $cwd;
BEGIN {
@@ -47,13 +78,17 @@
push(@ARGV,$ENV{PERL_MM_OPT});
push(@ARGV, @libs);
+ # <mst> GODDAMN makepl_arg INSTALLDIRS=site
+ # <mst> we must set PERL_AUTOINSTALL_PREFER_CPAN too
+ $ENV{PERL_AUTOINSTALL_PREFER_CPAN} = 1;
+
system($^X, '-MExtUtils::MakeMaker 6.31', '-e1');
my $eumm = $? >> 8;
system($^X, '-MExtUtils::Install 1.43', '-e1');
my $eui = $? >> 8;
- system($^X, '-MCPAN 1.80', '-e1');
+ system($^X, '-MCPAN 1.82', '-e1');
my $cpan = $? >> 8;
my $cpan_command = '';
@@ -67,6 +102,19 @@
}
return $orig->(@_);
};
+ # not yet -- apeiron, 2010-03-10
+ #$CPAN::Config->{urllist} = ["http://cpan.shadowcatprojects.net"];
+ # <mst> all bootstrapped fine on one DH account
+ # <mst> on another, it tries to install man stuff into /usr/local
+ # <mst> cannot for the life of me figure out why
+ # <mst> (same fucking server as well)
+ # <mst> GOT THE BASTARD
+ # <mst> ExtUtils::ParseXS uses Module::Build
+ # <mst> but Module::Build depends on it
+ # <mst> so you need to set prefer_installer MM
+ # <mst> so cpan uses EU::ParseXS Makefile.PL
+ # <mst> since we already got EUMM, *that* works
+ $CPAN::Config->{prefer_installer} = "EUMM";
CPAN::Config->load;
unless ($done || -w $CPAN::Config->{keep_source_where}) {
my $save = $CPAN::Config->{urllist};
@@ -127,7 +175,7 @@
requires 'ExtUtils::CBuilder'; # this and ParseXS are needed for MB C_support
requires 'ExtUtils::ParseXS';
requires 'Module::Build' => '0.28'; # lib -> lib/perl5 change
-my $required_CPAN = '1.80';
+my $required_CPAN = '1.82';
requires 'CPAN' => $required_CPAN; # sudo support + CPAN::HandleConfig
# No, really. See
Modified: branches/upstream/liblocal-lib-perl/current/lib/local/lib.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/lib/local/lib.pm?rev=54091&op=diff
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/lib/local/lib.pm (original)
+++ branches/upstream/liblocal-lib-perl/current/lib/local/lib.pm Thu Mar 11 14:54:12 2010
@@ -11,7 +11,7 @@
use Carp ();
use Config;
-our $VERSION = '1.004009'; # 1.4.9
+our $VERSION = '1.005001'; # 1.5.1
my @KNOWN_FLAGS = (qw/--self-contained/);
sub import {
@@ -55,11 +55,11 @@
# over privlibexp and archlibexp
@INC = _uniq(
+ $class->install_base_perl_path($arg_store{path}),
$class->install_base_arch_path($arg_store{path}),
- $class->install_base_perl_path($arg_store{path}),
split( $Config{path_sep}, $perl5lib ),
- $Config::Config{archlibexp},
$Config::Config{privlibexp},
+ $Config::Config{archlibexp}
);
# We explicitly set PERL5LIB here to the above de-duped list to prevent
@@ -350,7 +350,7 @@
PERL5LIB => join($Config{path_sep},
$class->install_base_perl_path($path),
$class->install_base_arch_path($path),
- ($ENV{PERL5LIB} ?
+ (($ENV{PERL5LIB}||()) ?
($interpolate == INTERPOLATE_ENV
? ($ENV{PERL5LIB})
: (($^O ne 'MSWin32') ? '$PERL5LIB' : '%PERL5LIB%' ))
@@ -359,7 +359,7 @@
PATH => join($Config{path_sep},
$class->install_base_bin_path($path),
($interpolate == INTERPOLATE_ENV
- ? $ENV{PATH}
+ ? ($ENV{PATH}||())
: (($^O ne 'MSWin32') ? '$PATH' : '%PATH%' ))
),
)
@@ -397,7 +397,7 @@
From the shell -
- # Install LWP and it's missing dependencies to the 'my_lwp' directory
+ # Install LWP and its missing dependencies to the 'my_lwp' directory
perl -MCPAN -Mlocal::lib=my_lwp -e 'CPAN::install(LWP)'
# Install LWP and *all non-core* dependencies to the 'my_lwp' directory
@@ -453,27 +453,9 @@
echo 'eval $(perl -I$HOME/foo/lib/perl5 -Mlocal::lib=$HOME/foo)' >>~/.bashrc
After writing your shell configuration file, be sure to re-read it to get the
-changed settings into your current shell's environment.
-
- . ~/.bashrc
-
-If you are using C shell, you can do this as follows:
-
- /bin/csh
- echo $SHELL
- /bin/csh
- perl -I$HOME/perl5/lib/perl5 -Mlocal::lib >> ~/.cshrc
-
- source ~/.cshrc
-
-You can also pass --bootstrap=~/foo to get a different location -
-
- perl Makefile.PL --bootstrap=~/foo
- make test && make install
-
- echo 'eval $(perl -I$HOME/foo/lib/perl5 -Mlocal::lib=$HOME/foo)' >> ~/.bashrc
-
- . ~/.bashrc
+changed settings into your current shell's environment. Bourne shells use C<.
+~/.bashrc> for this, whereas C shells use C<source ~/.cshrc>. Replace .bashrc or
+.cshrc with the name of the file you wrote above with the echo command.
If you're on a slower machine, or are operating under draconian disk space
limitations, you can disable the automatic generation of manpages from POD when
@@ -481,7 +463,7 @@
perl Makefile.PL --bootstrap --no-manpages
-If you want to install multiple Perl module environments, say for application evelopment,
+If you want to install multiple Perl module environments, say for application development,
install local::lib globally and then:
cd ~/mydir1
@@ -585,6 +567,26 @@
These values are then available for reference by any code after import.
+=head1 CREATING A SELF-CONTAINED SET OF MODULES
+
+You can use local::lib to prepare a directory which contains a module and all
+of its non-core dependencies. The C<--self-contained> option ignores any
+globally installed modules when resolving dependencies, only considering
+modules installed in a "local::lib" directory or provided by core Perl.
+
+A use-case for this feature would be to prepare to deploy a whole "stack" of
+module dependencies on a new machine, even if you have copies of the same
+dependencies installed globally already.
+
+The C<--self-contained> option should be used like this:
+
+ # Install LWP and *all non-core* dependencies to the 'my_lwp' directory
+ perl -MCPAN -Mlocal::lib=--self-contained,my_lwp -e 'CPAN::install(LWP)'
+
+Note that some dependencies may involve C-based "XS" code even if your target
+module doesn't. The issue of dealing with XS vs Pure Perl code is beyond the scope
+of what local::lib provides.
+
=head1 METHODS
=head2 ensure_directory_structure_for
@@ -785,10 +787,6 @@
=head1 CONTRIBUTORS
-Chris Nehren <apeiron at cpan.org> now oversees maintenance of local::lib, in
-addition to providing doc patches and bootstrap fixes to prevent users from
-shooting themselves in the foot (it's more likely than you think).
-
Patches to correctly output commands for csh style shells, as well as some
documentation additions, contributed by Christopher Nehren <apeiron at cpan.org>.
@@ -811,11 +809,8 @@
Patch to add Win32 support contributed by Curtis Jewell <csjewell at cpan.org>.
-kgish/#perl-help at irc.perl.org suggested revamping the section on sourcing the
-shell file to make it clearer to those quickly reading the POD.
-
-t0m and chrisa on #local-lib at irc.perl.org pointed out a PERL5LIB ordering issue
-with C<--self-contained>.
+Warnings for missing PATH/PERL5LIB (as when not running interactively) silenced
+by a patch from Marco Emilio Poleggi.
=head1 COPYRIGHT
Added: branches/upstream/liblocal-lib-perl/current/t/coderefs_in_inc.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/t/coderefs_in_inc.t?rev=54091&op=file
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/t/coderefs_in_inc.t (added)
+++ branches/upstream/liblocal-lib-perl/current/t/coderefs_in_inc.t Thu Mar 11 14:54:12 2010
@@ -1,0 +1,19 @@
+use strict;
+use warnings;
+use Test::More;
+use File::Temp qw(tempdir);
+use Cwd;
+
+# Test that refs in @INC don't get mangled.
+
+plan tests => 2;
+
+my $dir = tempdir('test_local_lib-XXXXX', DIR => Cwd::abs_path('t'), CLEANUP => 1);
+
+use local::lib ();
+my $code = sub {};
+push(@INC, $code);
+local::lib->import($dir);
+ok grep({ $_ eq $code } @INC), 'Can find code ref in @INC';
+ok grep({ ref $_ } @INC), 'It really is a ref, not stringified';
+
Added: branches/upstream/liblocal-lib-perl/current/t/de-dup.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/t/de-dup.t?rev=54091&op=file
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/t/de-dup.t (added)
+++ branches/upstream/liblocal-lib-perl/current/t/de-dup.t Thu Mar 11 14:54:12 2010
@@ -1,0 +1,32 @@
+use strict;
+use warnings;
+use Test::More;
+use File::Temp qw(tempdir);
+use Cwd;
+
+plan tests => 4;
+
+my $dir = tempdir('test_local_lib-XXXXX', DIR => Cwd::abs_path('t'), CLEANUP => 1);
+
+use local::lib ();
+local::lib->import($dir);
+local::lib->import($dir);
+
+{
+ my (%inc, %perl5lib);
+ map { $inc{$_}++ } @INC;
+ map { $perl5lib{$_} } split /:/, $ENV{PERL5LIB};
+ ok ! grep({ $inc{$_} > 1 } keys %inc), '@INC entries not duplicated';
+ ok ! grep({ $perl5lib{$_} > 1 } keys %perl5lib), 'ENV{PERL5LIB} entries not duplicated';
+}
+
+local::lib->import('--self-contained', $dir);
+
+{
+ my (%inc, %perl5lib);
+ map { $inc{$_}++ } @INC;
+ map { $perl5lib{$_} } split /:/, $ENV{PERL5LIB};
+ ok ! grep({ $inc{$_} > 1 } keys %inc), '@INC entries not duplicated (--self-contained)';
+ ok ! grep({ $perl5lib{$_} > 1 } keys %perl5lib), 'ENV{PERL5LIB} entries not duplicated (--self-contained)';
+}
+
More information about the Pkg-perl-cvs-commits
mailing list