'Archive::Tar' =>
{
'MAINTAINER' => 'kane',
- 'DISTRIBUTION' => 'BINGOS/Archive-Tar-1.78.tar.gz',
+ 'DISTRIBUTION' => 'BINGOS/Archive-Tar-1.80.tar.gz',
'FILES' => q[cpan/Archive-Tar],
'EXCLUDED' => [ qw(Makefile.PL) ],
'UPSTREAM' => 'cpan',
$DEBUG = 0;
$WARN = 1;
$FOLLOW_SYMLINK = 0;
-$VERSION = "1.78";
+$VERSION = "1.80";
$CHOWN = 1;
$CHMOD = 1;
$SAME_PERMISSIONS = $> == 0 ? 1 : 0;
$tar->rename('oldname', 'new/file/name');
$tar->chown('/', 'root');
$tar->chown('/', 'root:root');
+ $tar->chmod('/tmp', '1777');
$tar->write('files.tar'); # plain tar
$tar->write('files.tgz', COMPRESS_GZIP); # gzip compressed
return $entry->rename( $new );
}
+=head2 $tar->chmod( $file, $mode )
+
+Change mode of $file to $mode.
+
+Returns true on success and false on failure.
+
+=cut
+
+sub chmod {
+ my $self = shift;
+ my $file = shift; return unless defined $file;
+ my $mode = shift; return unless defined $mode && $mode =~ /^[0-7]{1,4}$/;
+ my @args = ("$mode");
+
+ my $entry = $self->_find_entry( $file ) or return;
+ my $x = $entry->chmod( @args );
+ return $x;
+}
+
=head2 $tar->chown( $file, $uname [, $gname] )
Change owner $file to $uname and $gname.
BEGIN {
require Exporter;
- $VERSION = '1.78';
+ $VERSION = '1.80';
@ISA = qw[Exporter];
require Time::Local if $^O eq "MacOS";
use vars qw[@ISA $VERSION];
#@ISA = qw[Archive::Tar];
-$VERSION = '1.78';
+$VERSION = '1.80';
### set value to 1 to oct() it during the unpack ###
my $tmpl = [
return 1;
}
+=head2 $bool = $file->chmod $mode)
+
+Change mode of $file to $mode. The mode can be a string or a number
+which is interpreted as octal whether or not a leading 0 is given.
+
+Returns true on success and false on failure.
+
+=cut
+
+sub chmod {
+ my $self = shift;
+ my $mode = shift; return unless defined $mode && $mode =~ /^[0-7]{1,4}$/;
+ $self->{mode} = oct($mode);
+ return 1;
+}
+
=head2 $bool = $file->chown( $user [, $group])
Change owner of $file to $user. If a $group is given that is changed
ok( $tar->add_files( $in_file ),
" Added '$in_file'" );
+
+ ok( $tar->chmod( $in_file, '1777'),
+ " chmod 177 $in_file" );
+
ok( $tar->chown( $in_file, 'root' ),
" chown to root" );
=item *
-L<perlfaq> has been upgraded from version 5.0150034 to version 5.0150035.
+L<Archive::Tar> has been upgraded from version 1.78 to version 1.80.
=item *
L<DynaLoader> has been upgraded from version 1.13 to 1.14.
It stopped exporting its symbols with the ExtUtils::ParseXS changes in
-5.15.2. Now it exports them once more.
+5.15.2. Now it exports them once more.
=item *
=item *
+L<perlfaq> has been upgraded from version 5.0150034 to version 5.0150035.
+
+=item *
+
L<Unicode::Collate> has been upgraded from version 0.78 to version 0.80.
Locales updated to CLDR 2.0: ar, be, bg, ha, hr, kk, lt.