Skip to content

Commit 401624c

Browse files
toddratoomic
authored andcommitted
Update Archive-Tar to CPAN version 2.38
[DELTA] 2.38 25/06/2020 (ATOOMIC) - Avoid indirect calls - Add use warnings to bin/ptar*
1 parent 0d96e6a commit 401624c

File tree

9 files changed

+21
-15
lines changed

9 files changed

+21
-15
lines changed

Porting/Maintainers.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ package Maintainers;
123123
%Modules = (
124124

125125
'Archive::Tar' => {
126-
'DISTRIBUTION' => 'BINGOS/Archive-Tar-2.36.tar.gz',
126+
'DISTRIBUTION' => 'BINGOS/Archive-Tar-2.38.tar.gz',
127127
'FILES' => q[cpan/Archive-Tar],
128128
'BUGS' => '[email protected]',
129129
'EXCLUDED' => [

cpan/Archive-Tar/bin/ptar

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/perl
22
use strict;
3+
use warnings;
34

45
BEGIN { pop @INC if $INC[-1] eq '.' }
56
use File::Find;

cpan/Archive-Tar/bin/ptardiff

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
BEGIN { pop @INC if $INC[-1] eq '.' }
44
use strict;
5+
use warnings;
56
use Archive::Tar;
67
use Getopt::Std;
78

cpan/Archive-Tar/lib/Archive/Tar.pm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use vars qw[$DEBUG $error $VERSION $WARN $FOLLOW_SYMLINK $CHOWN $CHMOD
3131
$DEBUG = 0;
3232
$WARN = 1;
3333
$FOLLOW_SYMLINK = 0;
34-
$VERSION = "2.36";
34+
$VERSION = "2.38";
3535
$CHOWN = 1;
3636
$CHMOD = 1;
3737
$SAME_PERMISSIONS = $> == 0 ? 1 : 0;
@@ -48,7 +48,7 @@ BEGIN {
4848
### switch between perlio and IO::String
4949
$HAS_IO_STRING = eval {
5050
require IO::String;
51-
import IO::String;
51+
IO::String->import;
5252
1;
5353
} || 0;
5454
}
@@ -918,7 +918,7 @@ sub _extract_file {
918918
}
919919

920920
if( $CHOWN && CAN_CHOWN->() and not -l $full ) {
921-
chown $entry->uid, $entry->gid, $full or
921+
CORE::chown( $entry->uid, $entry->gid, $full ) or
922922
$self->_error( qq[Could not set uid/gid on '$full'] );
923923
}
924924

@@ -929,7 +929,7 @@ sub _extract_file {
929929
unless ($SAME_PERMISSIONS) {
930930
$mode &= ~(oct(7000) | umask);
931931
}
932-
chmod $mode, $full or
932+
CORE::chmod( $mode, $full ) or
933933
$self->_error( qq[Could not chown '$full' to ] . $entry->mode );
934934
}
935935

@@ -2284,7 +2284,7 @@ write a C<.tar.Z> file
22842284
use Archive::Tar;
22852285
use IO::File;
22862286
2287-
my $fh = new IO::File "| compress -c >$filename";
2287+
my $fh = IO::File->new( "| compress -c >$filename" );
22882288
my $tar = Archive::Tar->new();
22892289
...
22902290
$tar->write($fh);

cpan/Archive-Tar/lib/Archive/Tar/Constant.pm

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
package Archive::Tar::Constant;
22

3+
use strict;
4+
use warnings;
5+
6+
use vars qw[$VERSION @ISA @EXPORT];
7+
38
BEGIN {
49
require Exporter;
510

6-
$VERSION = '2.36';
11+
$VERSION = '2.38';
712
@ISA = qw[Exporter];
813

914
require Time::Local if $^O eq "MacOS";
1015
}
1116

1217
@EXPORT = Archive::Tar::Constant->_list_consts( __PACKAGE__ );
1318

14-
use strict;
15-
use warnings;
16-
1719
use constant FILE => 0;
1820
use constant HARDLINK => 1;
1921
use constant SYMLINK => 2;

cpan/Archive-Tar/lib/Archive/Tar/File.pm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ use File::Spec::Unix ();
77
use File::Spec ();
88
use File::Basename ();
99

10-
### avoid circular use, so only require;
11-
require Archive::Tar;
1210
use Archive::Tar::Constant;
1311

1412
use vars qw[@ISA $VERSION];
1513
#@ISA = qw[Archive::Tar];
16-
$VERSION = '2.36';
14+
$VERSION = '2.38';
1715

1816
### set value to 1 to oct() it during the unpack ###
1917

@@ -469,6 +467,8 @@ sub extract {
469467

470468
local $Carp::CarpLevel += 1;
471469

470+
### avoid circular use, so only require;
471+
require Archive::Tar;
472472
return Archive::Tar->_extract_file( $self, @_ );
473473
}
474474

cpan/Archive-Tar/t/01_use.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ use strict;
33

44
use_ok('Archive::Tar') or diag 'Archive::Tar not found -- exit' && die;
55

6-
my $tar = new Archive::Tar;
6+
my $tar = Archive::Tar->new;
77
isa_ok( $tar, 'Archive::Tar', 'Object created' );

cpan/Archive-Tar/t/02_methods.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ sub slurp_compressed_file {
805805
### gzip
806806
} else {
807807
require IO::Zlib;
808-
$fh = new IO::Zlib;
808+
$fh = IO::Zlib->new();
809809
$fh->open( $file, READ_ONLY->(1) )
810810
or warn( "Error opening '$file' with IO::Zlib" ), return
811811
}

cpan/Archive-Tar/t/99_pod.t

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ find( sub { push @files, File::Spec->catfile(
1616
File::Spec->splitdir( $File::Find::dir ), $_
1717
) if /\.p(?:l|m|od)$/ }, File::Spec->catdir(qw(.. blib lib) ));
1818

19+
plan skip_all => "No tests to run" unless scalar @files;
20+
1921
plan tests => scalar @files;
2022
for my $file ( @files ) {
2123
pod_file_ok( $file );

0 commit comments

Comments
 (0)