Skip to content

Commit d1774d5

Browse files
committed
IO::Compress::Gzip accidentally modifies the $EXPORT_TAGS{all}->@* of other modules
Fixes #64
1 parent bb02b90 commit d1774d5

File tree

12 files changed

+13
-12
lines changed

12 files changed

+13
-12
lines changed

lib/IO/Compress/Bzip2.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ $Bzip2Error = '';
2020
@ISA = qw(IO::Compress::Base Exporter);
2121
@EXPORT_OK = qw( $Bzip2Error bzip2 ) ;
2222
%EXPORT_TAGS = %IO::Compress::Base::EXPORT_TAGS ;
23-
push @{ $EXPORT_TAGS{all} }, @EXPORT_OK ;
23+
$EXPORT_TAGS{all} = [ defined $EXPORT_TAGS{all} ? @{ $EXPORT_TAGS{all} } : (), @EXPORT_OK ] ;
2424
Exporter::export_ok_tags('all');
2525

2626

lib/IO/Compress/Deflate.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ $DeflateError = '';
2424
@EXPORT_OK = qw( $DeflateError deflate ) ;
2525
%EXPORT_TAGS = %IO::Compress::RawDeflate::DEFLATE_CONSTANTS ;
2626

27-
push @{ $EXPORT_TAGS{all} }, @EXPORT_OK ;
27+
$EXPORT_TAGS{all} = [ defined $EXPORT_TAGS{all} ? @{ $EXPORT_TAGS{all} } : (), @EXPORT_OK ] ;
28+
2829
Exporter::export_ok_tags('all');
2930

3031

lib/IO/Compress/Gzip.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ $GzipError = '' ;
3232
@EXPORT_OK = qw( $GzipError gzip ) ;
3333
%EXPORT_TAGS = %IO::Compress::RawDeflate::DEFLATE_CONSTANTS ;
3434

35-
push @{ $EXPORT_TAGS{all} }, @EXPORT_OK ;
35+
$EXPORT_TAGS{all} = [ defined $EXPORT_TAGS{all} ? @{ $EXPORT_TAGS{all} } : (), @EXPORT_OK ] ;
3636
Exporter::export_ok_tags('all');
3737

3838
sub new

lib/IO/Compress/Zip.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ $ZipError = '';
5454
@EXPORT_OK = qw( $ZipError zip ) ;
5555
%EXPORT_TAGS = %IO::Compress::RawDeflate::DEFLATE_CONSTANTS ;
5656

57-
push @{ $EXPORT_TAGS{all} }, @EXPORT_OK ;
57+
$EXPORT_TAGS{all} = [ defined $EXPORT_TAGS{all} ? @{ $EXPORT_TAGS{all} } : (), @EXPORT_OK ] ;
5858

5959
$EXPORT_TAGS{zip_method} = [qw( ZIP_CM_STORE ZIP_CM_DEFLATE ZIP_CM_BZIP2 ZIP_CM_LZMA ZIP_CM_XZ ZIP_CM_ZSTD)];
6060
push @{ $EXPORT_TAGS{all} }, @{ $EXPORT_TAGS{zip_method} };

lib/IO/Uncompress/AnyInflate.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ $AnyInflateError = '';
2727
@ISA = qw(IO::Uncompress::Base Exporter);
2828
@EXPORT_OK = qw( $AnyInflateError anyinflate ) ;
2929
%EXPORT_TAGS = %IO::Uncompress::Base::DEFLATE_CONSTANTS if keys %IO::Uncompress::Base::DEFLATE_CONSTANTS;
30-
push @{ $EXPORT_TAGS{all} }, @EXPORT_OK ;
30+
$EXPORT_TAGS{all} = [ defined $EXPORT_TAGS{all} ? @{ $EXPORT_TAGS{all} } : (), @EXPORT_OK ] ;
3131
Exporter::export_ok_tags('all');
3232

3333
# TODO - allow the user to pick a set of the three formats to allow

lib/IO/Uncompress/AnyUncompress.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ $AnyUncompressError = '';
1919
@ISA = qw(IO::Uncompress::Base Exporter);
2020
@EXPORT_OK = qw( $AnyUncompressError anyuncompress ) ;
2121
%EXPORT_TAGS = %IO::Uncompress::Base::DEFLATE_CONSTANTS if keys %IO::Uncompress::Base::DEFLATE_CONSTANTS;
22-
push @{ $EXPORT_TAGS{all} }, @EXPORT_OK ;
22+
$EXPORT_TAGS{all} = [ defined $EXPORT_TAGS{all} ? @{ $EXPORT_TAGS{all} } : (), @EXPORT_OK ] ;
2323
Exporter::export_ok_tags('all');
2424

2525
# TODO - allow the user to pick a set of the three formats to allow

lib/IO/Uncompress/Base.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use List::Util ();
2323
use Carp ;
2424

2525
%EXPORT_TAGS = ( );
26-
push @{ $EXPORT_TAGS{all} }, @EXPORT_OK ;
26+
$EXPORT_TAGS{all} = [ defined $EXPORT_TAGS{all} ? @{ $EXPORT_TAGS{all} } : (), @EXPORT_OK ] ;
2727

2828
sub smartRead
2929
{

lib/IO/Uncompress/Bunzip2.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $Bunzip2Error = '';
1818
@ISA = qw(IO::Uncompress::Base Exporter);
1919
@EXPORT_OK = qw( $Bunzip2Error bunzip2 ) ;
2020
#%EXPORT_TAGS = %IO::Uncompress::Base::EXPORT_TAGS ;
21-
push @{ $EXPORT_TAGS{all} }, @EXPORT_OK ;
21+
$EXPORT_TAGS{all} = [ defined $EXPORT_TAGS{all} ? @{ $EXPORT_TAGS{all} } : (), @EXPORT_OK ] ;
2222
#Exporter::export_ok_tags('all');
2323

2424

lib/IO/Uncompress/Gunzip.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $GunzipError);
2323
@ISA = qw(IO::Uncompress::RawInflate Exporter);
2424
@EXPORT_OK = qw( $GunzipError gunzip );
2525
%EXPORT_TAGS = %IO::Uncompress::RawInflate::DEFLATE_CONSTANTS ;
26-
push @{ $EXPORT_TAGS{all} }, @EXPORT_OK ;
26+
$EXPORT_TAGS{all} = [ defined $EXPORT_TAGS{all} ? @{ $EXPORT_TAGS{all} } : (), @EXPORT_OK ] ;
2727
Exporter::export_ok_tags('all');
2828

2929
$GunzipError = '';

lib/IO/Uncompress/Inflate.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ $InflateError = '';
1919
@ISA = qw(IO::Uncompress::RawInflate Exporter);
2020
@EXPORT_OK = qw( $InflateError inflate ) ;
2121
%EXPORT_TAGS = %IO::Uncompress::RawInflate::DEFLATE_CONSTANTS ;
22-
push @{ $EXPORT_TAGS{all} }, @EXPORT_OK ;
22+
$EXPORT_TAGS{all} = [ defined $EXPORT_TAGS{all} ? @{ $EXPORT_TAGS{all} } : (), @EXPORT_OK ] ;
2323
Exporter::export_ok_tags('all');
2424

2525

0 commit comments

Comments
 (0)