summaryrefslogtreecommitdiff
path: root/cpan/Archive-Tar
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2010-07-26 10:59:37 +0100
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2010-07-26 10:59:37 +0100
commit82e235474c3b2fa7c9c69c85c23e860d59851685 (patch)
tree0cdfb9f3992534ca3342e8bdd8e8410b63bc2324 /cpan/Archive-Tar
parentc6b35c2b6118dd316c39eb5231d11fd1b76824f9 (diff)
downloadperl-82e235474c3b2fa7c9c69c85c23e860d59851685.tar.gz
Updated Archive-Tar to CPAN version 1.66
[DELTA] * important changes in version 1.66 26/07/2010 - Applied a patch from Alexandr Ciornii [RT#59699] to Makefile.PL which produces better META.yml - Apply a patch from Alexandr Ciornii to ptar [RT#59700]: Adds option -C to allow archives created with ptar to be uploaded to PAUSE in case of Windows or world +w permissions on unix.
Diffstat (limited to 'cpan/Archive-Tar')
-rw-r--r--cpan/Archive-Tar/bin/ptar15
-rw-r--r--cpan/Archive-Tar/lib/Archive/Tar.pm2
-rw-r--r--cpan/Archive-Tar/lib/Archive/Tar/Constant.pm2
-rw-r--r--cpan/Archive-Tar/lib/Archive/Tar/File.pm2
4 files changed, 14 insertions, 7 deletions
diff --git a/cpan/Archive-Tar/bin/ptar b/cpan/Archive-Tar/bin/ptar
index 6a3c1bcd2e..653ce3554b 100644
--- a/cpan/Archive-Tar/bin/ptar
+++ b/cpan/Archive-Tar/bin/ptar
@@ -7,7 +7,7 @@ use Archive::Tar;
use Data::Dumper;
my $opts = {};
-getopts('Ddcvzthxf:I', $opts) or die usage();
+getopts('Ddcvzthxf:IC', $opts) or die usage();
### show the help message ###
die usage() if $opts->{h};
@@ -40,8 +40,14 @@ if( $opts->{c} ) {
$file->fdopen(fileno(STDOUT),"w");
}
- Archive::Tar->create_archive( $file, $compress, @files );
-
+ my $tar = Archive::Tar->new;
+ $tar->add_files(@files);
+ if( $opts->{C} ) {
+ for my $f ($tar->get_files) {
+ $f->mode($f->mode & ~022); # chmod go-w
+ }
+ }
+ $tar->write($file, $compress);
} else {
if ($file eq '-') {
use IO::Handle;
@@ -81,7 +87,7 @@ sub usage {
=head1 SYNOPSIS
- ptar -c [-v] [-z] [-f ARCHIVE_FILE | -] FILE FILE ...
+ ptar -c [-v] [-z] [-C] [-f ARCHIVE_FILE | -] FILE FILE ...
ptar -x [-v] [-z] [-f ARCHIVE_FILE | -]
ptar -t [-z] [-f ARCHIVE_FILE | -]
ptar -h
@@ -95,6 +101,7 @@ sub usage {
z Read/Write zlib compressed ARCHIVE_FILE (not always available)
v Print filenames as they are added or extraced from ARCHIVE_FILE
h Prints this help message
+ C CPAN mode - drop 022 from permissions
=head1 SEE ALSO
diff --git a/cpan/Archive-Tar/lib/Archive/Tar.pm b/cpan/Archive-Tar/lib/Archive/Tar.pm
index 021d311b9c..2e21bbbf7c 100644
--- a/cpan/Archive-Tar/lib/Archive/Tar.pm
+++ b/cpan/Archive-Tar/lib/Archive/Tar.pm
@@ -31,7 +31,7 @@ use vars qw[$DEBUG $error $VERSION $WARN $FOLLOW_SYMLINK $CHOWN $CHMOD
$DEBUG = 0;
$WARN = 1;
$FOLLOW_SYMLINK = 0;
-$VERSION = "1.64";
+$VERSION = "1.66";
$CHOWN = 1;
$CHMOD = 1;
$SAME_PERMISSIONS = $> == 0 ? 1 : 0;
diff --git a/cpan/Archive-Tar/lib/Archive/Tar/Constant.pm b/cpan/Archive-Tar/lib/Archive/Tar/Constant.pm
index cf9a9727ac..3353d1bf84 100644
--- a/cpan/Archive-Tar/lib/Archive/Tar/Constant.pm
+++ b/cpan/Archive-Tar/lib/Archive/Tar/Constant.pm
@@ -3,7 +3,7 @@ package Archive::Tar::Constant;
BEGIN {
require Exporter;
- $VERSION = '1.64';
+ $VERSION = '1.66';
@ISA = qw[Exporter];
require Time::Local if $^O eq "MacOS";
diff --git a/cpan/Archive-Tar/lib/Archive/Tar/File.pm b/cpan/Archive-Tar/lib/Archive/Tar/File.pm
index 605629284e..1e90e9a9ba 100644
--- a/cpan/Archive-Tar/lib/Archive/Tar/File.pm
+++ b/cpan/Archive-Tar/lib/Archive/Tar/File.pm
@@ -13,7 +13,7 @@ use Archive::Tar::Constant;
use vars qw[@ISA $VERSION];
#@ISA = qw[Archive::Tar];
-$VERSION = '1.64';
+$VERSION = '1.66';
### set value to 1 to oct() it during the unpack ###
my $tmpl = [