This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade cpan/Archive-Tar to 1.84
authorAbigail <abigail@abigail.be>
Mon, 12 Mar 2012 20:47:00 +0000 (21:47 +0100)
committerAbigail <abigail@abigail.be>
Mon, 12 Mar 2012 20:47:00 +0000 (21:47 +0100)
Porting/Maintainers.pl
cpan/Archive-Tar/bin/ptar
cpan/Archive-Tar/lib/Archive/Tar.pm
cpan/Archive-Tar/lib/Archive/Tar/Constant.pm
cpan/Archive-Tar/lib/Archive/Tar/File.pm

index e938475..b92c6ab 100755 (executable)
@@ -207,7 +207,7 @@ use File::Glob qw(:case);
 
     'Archive::Tar' => {
         'MAINTAINER'   => 'kane',
 
     'Archive::Tar' => {
         'MAINTAINER'   => 'kane',
-        'DISTRIBUTION' => 'BINGOS/Archive-Tar-1.82.tar.gz',
+        'DISTRIBUTION' => 'BINGOS/Archive-Tar-1.84.tar.gz',
         'FILES'        => q[cpan/Archive-Tar],
         'EXCLUDED'     => ['Makefile.PL'],
         'UPSTREAM'     => 'cpan',
         'FILES'        => q[cpan/Archive-Tar],
         'EXCLUDED'     => ['Makefile.PL'],
         'UPSTREAM'     => 'cpan',
index 14c0912..0eaffa7 100644 (file)
@@ -6,8 +6,13 @@ use Getopt::Std;
 use Archive::Tar;
 use Data::Dumper;
 
 use Archive::Tar;
 use Data::Dumper;
 
+# Allow historic support for dashless bundled options
+#  tar cvf file.tar
+# is valid (GNU) tar style
+@ARGV && $ARGV[0] =~ m/^[DdcvzthxIC]+[fT]?$/ and
+    unshift @ARGV, map { "-$_" } split m// => shift @ARGV;
 my $opts = {};
 my $opts = {};
-getopts('Ddcvzthxf:IC', $opts) or die usage();
+getopts('Ddcvzthxf:ICT:', $opts) or die usage();
 
 ### show the help message ###
 die usage() if $opts->{h};
 
 ### show the help message ###
 die usage() if $opts->{h};
@@ -28,11 +33,21 @@ my $verbose     = $opts->{v} ? 1 : 0;
 my $file        = $opts->{f} ? $opts->{f} : 'default.tar';
 my $tar         = Archive::Tar->new();
 
 my $file        = $opts->{f} ? $opts->{f} : 'default.tar';
 my $tar         = Archive::Tar->new();
 
-
 if( $opts->{c} ) {
     my @files;
 if( $opts->{c} ) {
     my @files;
+    my @src = @ARGV;
+    if( $opts->{T} ) {
+      if( $opts->{T} eq "-" ) {
+        chomp( @src = <STDIN> );
+       } elsif( open my $fh, "<", $opts->{T} ) {
+           chomp( @src = <$fh> );
+       } else {
+           die "$0: $opts->{T}: $!\n";
+       }
+    }
+
     find( sub { push @files, $File::Find::name;
     find( sub { push @files, $File::Find::name;
-                print $File::Find::name.$/ if $verbose }, @ARGV );
+                print $File::Find::name.$/ if $verbose }, @src );
 
     if ($file eq '-') {
         use IO::Handle;
 
     if ($file eq '-') {
         use IO::Handle;
@@ -88,6 +103,7 @@ sub usage {
 =head1 SYNOPSIS
 
     ptar -c [-v] [-z] [-C] [-f ARCHIVE_FILE | -] FILE FILE ...
 =head1 SYNOPSIS
 
     ptar -c [-v] [-z] [-C] [-f ARCHIVE_FILE | -] FILE FILE ...
+    ptar -c [-v] [-z] [-C] [-T index | -] [-f ARCHIVE_FILE | -]
     ptar -x [-v] [-z] [-f ARCHIVE_FILE | -]
     ptar -t [-z] [-f ARCHIVE_FILE | -]
     ptar -h
     ptar -x [-v] [-z] [-f ARCHIVE_FILE | -]
     ptar -t [-z] [-f ARCHIVE_FILE | -]
     ptar -h
@@ -102,6 +118,7 @@ sub usage {
     v   Print filenames as they are added or extracted from ARCHIVE_FILE
     h   Prints this help message
     C   CPAN mode - drop 022 from permissions
     v   Print filenames as they are added or extracted from ARCHIVE_FILE
     h   Prints this help message
     C   CPAN mode - drop 022 from permissions
+    T   get names to create from file
 
 =head1 SEE ALSO
 
 
 =head1 SEE ALSO
 
index 4ed3ae0..c57f56b 100644 (file)
@@ -31,7 +31,7 @@ use vars qw[$DEBUG $error $VERSION $WARN $FOLLOW_SYMLINK $CHOWN $CHMOD
 $DEBUG                  = 0;
 $WARN                   = 1;
 $FOLLOW_SYMLINK         = 0;
 $DEBUG                  = 0;
 $WARN                   = 1;
 $FOLLOW_SYMLINK         = 0;
-$VERSION                = "1.82";
+$VERSION                = "1.84";
 $CHOWN                  = 1;
 $CHMOD                  = 1;
 $SAME_PERMISSIONS       = $> == 0 ? 1 : 0;
 $CHOWN                  = 1;
 $CHMOD                  = 1;
 $SAME_PERMISSIONS       = $> == 0 ? 1 : 0;
@@ -1451,6 +1451,12 @@ sub add_files {
             next;
         }
 
             next;
         }
 
+        eval {
+            if( utf8::is_utf8( $file )) {
+              utf8::encode( $file );
+            }
+        };
+
         unless( -e $file || -l $file ) {
             $self->_error( qq[No such file: '$file'] );
             next;
         unless( -e $file || -l $file ) {
             $self->_error( qq[No such file: '$file'] );
             next;
index 1bea5ce..b01e226 100644 (file)
@@ -3,7 +3,7 @@ package Archive::Tar::Constant;
 BEGIN {
     require Exporter;
 
 BEGIN {
     require Exporter;
 
-    $VERSION    = '1.82';
+    $VERSION    = '1.84';
     @ISA        = qw[Exporter];
 
     require Time::Local if $^O eq "MacOS";
     @ISA        = qw[Exporter];
 
     require Time::Local if $^O eq "MacOS";
index 9067de1..8607caa 100644 (file)
@@ -13,7 +13,7 @@ use Archive::Tar::Constant;
 
 use vars qw[@ISA $VERSION];
 #@ISA        = qw[Archive::Tar];
 
 use vars qw[@ISA $VERSION];
 #@ISA        = qw[Archive::Tar];
-$VERSION    = '1.82';
+$VERSION    = '1.84';
 
 ### set value to 1 to oct() it during the unpack ###
 
 
 ### set value to 1 to oct() it during the unpack ###