diff options
Diffstat (limited to 'Master/tlpkg/tlperl/lib/ExtUtils/Manifest.pm')
-rw-r--r-- | Master/tlpkg/tlperl/lib/ExtUtils/Manifest.pm | 56 |
1 files changed, 33 insertions, 23 deletions
diff --git a/Master/tlpkg/tlperl/lib/ExtUtils/Manifest.pm b/Master/tlpkg/tlperl/lib/ExtUtils/Manifest.pm index 5bcd6d693a4..4163c933abf 100644 --- a/Master/tlpkg/tlperl/lib/ExtUtils/Manifest.pm +++ b/Master/tlpkg/tlperl/lib/ExtUtils/Manifest.pm @@ -5,27 +5,24 @@ use Config; use File::Basename; use File::Copy 'copy'; use File::Find; -use File::Spec; +use File::Spec 0.8; use Carp; use strict; +use warnings; -use vars qw($VERSION @ISA @EXPORT_OK - $Is_MacOS $Is_VMS $Is_VMS_mode $Is_VMS_lc $Is_VMS_nodot - $Debug $Verbose $Quiet $MANIFEST $DEFAULT_MSKIP); - -$VERSION = '1.63'; -@ISA=('Exporter'); -@EXPORT_OK = qw(mkmanifest +our $VERSION = '1.70'; +our @ISA = ('Exporter'); +our @EXPORT_OK = qw(mkmanifest manicheck filecheck fullcheck skipcheck manifind maniread manicopy maniadd maniskip ); -$Is_MacOS = $^O eq 'MacOS'; -$Is_VMS = $^O eq 'VMS'; -$Is_VMS_mode = 0; -$Is_VMS_lc = 0; -$Is_VMS_nodot = 0; # No dots in dir names or double dots in files +our $Is_MacOS = $^O eq 'MacOS'; +our $Is_VMS = $^O eq 'VMS'; +our $Is_VMS_mode = 0; +our $Is_VMS_lc = 0; +our $Is_VMS_nodot = 0; # No dots in dir names or double dots in files if ($Is_VMS) { require VMS::Filespec if $Is_VMS; @@ -53,19 +50,23 @@ if ($Is_VMS) { $Is_VMS_nodot = 0 if ($vms_efs); } -$Debug = $ENV{PERL_MM_MANIFEST_DEBUG} || 0; -$Verbose = defined $ENV{PERL_MM_MANIFEST_VERBOSE} ? +our $Debug = $ENV{PERL_MM_MANIFEST_DEBUG} || 0; +our $Verbose = defined $ENV{PERL_MM_MANIFEST_VERBOSE} ? $ENV{PERL_MM_MANIFEST_VERBOSE} : 1; -$Quiet = 0; -$MANIFEST = 'MANIFEST'; +our $Quiet = 0; +our $MANIFEST = 'MANIFEST'; -$DEFAULT_MSKIP = File::Spec->catfile( dirname(__FILE__), "$MANIFEST.SKIP" ); +our $DEFAULT_MSKIP = File::Spec->catfile( dirname(__FILE__), "$MANIFEST.SKIP" ); =head1 NAME ExtUtils::Manifest - utilities to write and check a MANIFEST file +=head1 VERSION + +version 1.70 + =head1 SYNOPSIS use ExtUtils::Manifest qw(...funcs to import...); @@ -124,6 +125,7 @@ sub mkmanifest { $bakbase =~ s/\./_/g if $Is_VMS_nodot; # avoid double dots rename $MANIFEST, "$bakbase.bak" unless $manimiss; open M, "> $MANIFEST" or die "Could not open $MANIFEST: $!"; + binmode M, ':raw'; my $skip = maniskip(); my $found = manifind(); my($key,$val,$file,%all); @@ -197,7 +199,7 @@ sub manifind { # $File::Find::name is unavailable. # Also, it's okay to use / here, because MANIFEST files use Unix-style # paths. - find({wanted => $wanted}, + find({wanted => $wanted, follow_fast => 1}, $Is_MacOS ? ":" : "."); return $found; @@ -356,7 +358,7 @@ sub maniread { # filename may contain spaces if enclosed in '' # (in which case, \\ and \' are escapes) - if (($file, $comment) = /^'(\\[\\']|.+)+'\s*(.*)/) { + if (($file, $comment) = /^'((?:\\[\\']|.+)+)'\s*(.*)/) { $file =~ s/\\([\\'])/$1/g; } else { @@ -483,6 +485,7 @@ sub _check_mskip_directives { warn "Problem opening $mfile: $!"; return; } + binmode M, ':raw'; print M $_ for (@lines); close M; return; @@ -696,6 +699,7 @@ sub maniadd { open(MANIFEST, ">>$MANIFEST") or die "maniadd() could not open $MANIFEST: $!"; + binmode MANIFEST, ':raw'; foreach my $file (_sort @needed) { my $comment = $additions->{$file} || ''; @@ -737,6 +741,7 @@ sub _fix_manifest { if ( $must_rewrite ) { 1 while unlink $MANIFEST; # avoid multiple versions on VMS open MANIFEST, ">", $MANIFEST or die "(must_rewrite=$must_rewrite) Could not open >$MANIFEST: $!"; + binmode MANIFEST, ':raw'; for (my $i=0; $i<=$#manifest; $i+=2) { print MANIFEST "$manifest[$i]\n"; } @@ -892,9 +897,14 @@ L<ExtUtils::MakeMaker> which has handy targets for most of the functionality. Andreas Koenig C<andreas.koenig@anima.de> -Maintained by Michael G Schwern C<schwern@pobox.com> within the -ExtUtils-MakeMaker package and, as a separate CPAN package, by -Randy Kobes C<r.kobes@uwinnipeg.ca>. +Currently maintained by the Perl Toolchain Gang. + +=head1 COPYRIGHT AND LICENSE + +This software is copyright (c) 1996- by Andreas Koenig. + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. =cut |