diff options
author | 2013-03-25 20:06:16 +0000 | |
---|---|---|
committer | 2013-03-25 20:06:16 +0000 | |
commit | 898184e3e61f9129feb5978fad5a8c6865f00b92 (patch) | |
tree | 56f32aefc1eed60b534611007c7856f82697a205 /gnu/usr.bin/perl/dist/ExtUtils-Install/lib/ExtUtils | |
parent | PGSHIFT -> PAGE_SHIFT (diff) | |
download | wireguard-openbsd-898184e3e61f9129feb5978fad5a8c6865f00b92.tar.xz wireguard-openbsd-898184e3e61f9129feb5978fad5a8c6865f00b92.zip |
import perl 5.16.3 from CPAN - worked on by Andrew Fresh and myself
Diffstat (limited to 'gnu/usr.bin/perl/dist/ExtUtils-Install/lib/ExtUtils')
3 files changed, 28 insertions, 18 deletions
diff --git a/gnu/usr.bin/perl/dist/ExtUtils-Install/lib/ExtUtils/Install.pm b/gnu/usr.bin/perl/dist/ExtUtils-Install/lib/ExtUtils/Install.pm index da583650fdf..7e4cd7fade0 100644 --- a/gnu/usr.bin/perl/dist/ExtUtils-Install/lib/ExtUtils/Install.pm +++ b/gnu/usr.bin/perl/dist/ExtUtils-Install/lib/ExtUtils/Install.pm @@ -38,11 +38,11 @@ ExtUtils::Install - install files from here to there =head1 VERSION -1.55 +1.58 =cut -$VERSION = '1.55'; # <---- dont forget to update the POD section just above this line! +$VERSION = '1.58'; # <---- dont forget to update the POD section just above this line! $VERSION = eval $VERSION; =pod @@ -73,10 +73,10 @@ has occured. If this value is defined but false then such an operation has ocurred, but should not impact later operations. -=begin _private - =over +=begin _private + =item _chmod($$;$) Wrapper to chmod() for debugging and error trapping. @@ -297,7 +297,7 @@ sub _unlink_or_rename { #XXX OS-SPECIFIC "Going to try to rename it to '$tmp'.\n"; if ( rename $file, $tmp ) { - warn "Rename succesful. Scheduling '$tmp'\nfor deletion at reboot.\n"; + warn "Rename successful. Scheduling '$tmp'\nfor deletion at reboot.\n"; # when $installing we can set $moan to true. # IOW, if we cant delete the renamed file at reboot its # not the end of the world. The other cases are more serious @@ -310,7 +310,7 @@ sub _unlink_or_rename { #XXX OS-SPECIFIC _move_file_at_boot( $tmp, $file ); return $tmp; } else { - _choke("Rename failed:$!", "Cannot procede."); + _choke("Rename failed:$!", "Cannot proceed."); } } @@ -520,7 +520,7 @@ sub _mkpath { Wrapper around File::Copy::copy to handle errors. -If $verbose is true and >1 then additional dignostics will be emitted. +If $verbose is true and >1 then additional diagnostics will be emitted. If $dry_run is true then the copy will not actually occur. @@ -790,7 +790,7 @@ sub install { #XXX OS-SPECIFIC ]; #restore the original directory we were in when File::Find - #called us so that it doesnt get horribly confused. + #called us so that it doesn't get horribly confused. _chdir($save_cwd); }, $current_directory ); _chdir($cwd); @@ -1056,7 +1056,7 @@ sub uninstall { Remove shadowed files. If $ignore is true then it is assumed to hold a filename to ignore. This is used to prevent spurious warnings from -occuring when doing an install at reboot. +occurring when doing an install at reboot. We now only die when failing to remove a file that has precedence over our own, when our install has precedence we only warn. diff --git a/gnu/usr.bin/perl/dist/ExtUtils-Install/lib/ExtUtils/Installed.pm b/gnu/usr.bin/perl/dist/ExtUtils-Install/lib/ExtUtils/Installed.pm index 9cb1fc10d75..b4b7f7580fa 100644 --- a/gnu/usr.bin/perl/dist/ExtUtils-Install/lib/ExtUtils/Installed.pm +++ b/gnu/usr.bin/perl/dist/ExtUtils-Install/lib/ExtUtils/Installed.pm @@ -17,7 +17,7 @@ my $DOSISH = ($^O =~ /^(MSWin\d\d|os2|dos|mint)$/); require VMS::Filespec if $Is_VMS; use vars qw($VERSION); -$VERSION = '1.999_001'; +$VERSION = '1.999002'; $VERSION = eval $VERSION; sub _is_prefix { @@ -162,7 +162,9 @@ sub new { } { my %dupe; - @{$self->{':private:'}{LIBDIRS}} = grep { -e $_ && !$dupe{$_}++ } + @{$self->{':private:'}{LIBDIRS}} = + grep { $_ ne '.' || ! $args{skip_cwd} } + grep { -e $_ && !$dupe{$_}++ } @{$self->{':private:'}{EXTRA}}, @{$self->{':private:'}{INC}}; } @@ -327,7 +329,7 @@ ExtUtils::Installed - Inventory management of installed modules =head1 SYNOPSIS use ExtUtils::Installed; - my ($inst) = ExtUtils::Installed->new(); + my ($inst) = ExtUtils::Installed->new( skip_cwd => 1 ); my (@modules) = $inst->modules(); my (@missing) = $inst->validate("DBI"); my $all_files = $inst->files("DBI"); @@ -369,6 +371,11 @@ information from C<%Config::Config> and the default module search paths C<@INC>. The packlists are read using the L<ExtUtils::Packlist> module. +If the named parameter C<skip_cwd> is true, the current directory C<.> will +be stripped from C<@INC> before searching for .packlists. This keeps +ExtUtils::Installed from finding modules installed in other perls that +happen to be located below the current directory. + If the named parameter C<config_override> is specified, it should be a reference to a hash which contains all information usually found in C<%Config::Config>. For example, you can obtain @@ -376,7 +383,8 @@ the configuration information for a separate perl installation and pass that in. my $yoda_cfg = get_fake_config('yoda'); - my $yoda_inst = ExtUtils::Installed->new(config_override=>$yoda_cfg); + my $yoda_inst = + ExtUtils::Installed->new(config_override=>$yoda_cfg); Similarly, the parameter C<inc_override> may be a reference to an array which is used in place of the default module search paths @@ -389,10 +397,11 @@ from C<@INC>. B<Note>: You probably do not want to use these options alone, almost always you will want to set both together. -The parameter c<extra_libs> can be used to specify B<additional> paths to +The parameter C<extra_libs> can be used to specify B<additional> paths to search for installed modules. For instance - my $installed = ExtUtils::Installed->new(extra_libs=>["/my/lib/path"]); + my $installed = + ExtUtils::Installed->new(extra_libs=>["/my/lib/path"]); This should only be necessary if C</my/lib/path> is not in PERL5LIB. diff --git a/gnu/usr.bin/perl/dist/ExtUtils-Install/lib/ExtUtils/Packlist.pm b/gnu/usr.bin/perl/dist/ExtUtils-Install/lib/ExtUtils/Packlist.pm index b77a556be50..a268e300d3c 100644 --- a/gnu/usr.bin/perl/dist/ExtUtils-Install/lib/ExtUtils/Packlist.pm +++ b/gnu/usr.bin/perl/dist/ExtUtils-Install/lib/ExtUtils/Packlist.pm @@ -5,7 +5,7 @@ use strict; use Carp qw(); use Config; use vars qw($VERSION $Relocations); -$VERSION = '1.44'; +$VERSION = '1.46'; $VERSION = eval $VERSION; # Used for generating filehandle globs. IO::File might not be available! @@ -24,6 +24,7 @@ Make a filehandle. Same kind of idea as Symbol::gensym(). sub mkfh() { no strict; +local $^W; my $fh = \*{$fhname++}; use strict; return($fh); @@ -34,10 +35,10 @@ return($fh); Works out what absolute paths in the configuration have been located at run time relative to $^X, and generates a regexp that matches them -=end _undocumented - =back +=end _undocumented + =cut sub __find_relocations |