@@ -34,7 +34,7 @@ our %PARAMS = (
34
34
35
35
sub _ckParams
36
36
{
37
- my $got = IO::Compress::Base::Parameters:: new();
37
+ my $got = IO::Compress::Base::Parameters-> new();
38
38
39
39
$got -> parse(\%PARAMS , @_ )
40
40
or _myDie(" Parameter Error: " . $got -> getError()) ;
@@ -94,7 +94,7 @@ sub new
94
94
return _illegalFilename
95
95
}
96
96
97
- $fh = new IO::File " <$inValue "
97
+ $fh = IO::File-> new( " <$inValue " )
98
98
or return _setError(undef , undef , " cannot open file '$inValue ': $! " );
99
99
}
100
100
elsif ( $inType eq ' buffer' || $inType eq ' handle' )
@@ -806,7 +806,7 @@ sub STORABLE_thaw
806
806
if ($self -> isFile())
807
807
{
808
808
my $handle = $self -> open ();
809
- my $fh = new IO::File " >$filename "
809
+ my $fh = IO::File-> new( " >$filename " )
810
810
or return _setError(" Cannot open file '$filename ': $! " );
811
811
# $fh->binmode(); # not available in 5.8.0
812
812
@@ -972,7 +972,7 @@ Archive::Zip::SimpleUnzip - Read Zip Archives
972
972
973
973
use Archive::Zip::SimpleUnzip qw($SimpleUnzipError) ;
974
974
975
- my $z = new Archive::Zip::SimpleUnzip " my.zip"
975
+ my $z = Archive::Zip::SimpleUnzip->NEW(' my.zip')
976
976
or die "Cannot open zip file: $SimpleUnzipError\n" ;
977
977
978
978
# How many members in the archive?
@@ -982,21 +982,21 @@ Archive::Zip::SimpleUnzip - Read Zip Archives
982
982
my @names = $z->names();
983
983
984
984
# Test member existence
985
- if ($z->exists(" abc.txt" ))
985
+ if ($z->exists(' abc.txt' ))
986
986
{
987
987
...
988
988
}
989
989
990
990
# Extract member to filesystem
991
- $z->extract(" member" ) ;
992
- $z->extract(" member", " outfile" ) ;
991
+ $z->extract(' member' ) ;
992
+ $z->extract(' member', ' outfile' ) ;
993
993
994
994
995
995
# Read the zip comment
996
996
my $comment = $zip->comment();
997
997
998
998
# Select a member by name
999
- my $member = $z->member(" abc.txt" );
999
+ my $member = $z->member(' abc.txt' );
1000
1000
my $name = $member->name();
1001
1001
my $content = $member->content();
1002
1002
my $comment = $member->comment();
@@ -1050,9 +1050,9 @@ Note that the code assume that the zip archive is being read from a seekable fil
1050
1050
1051
1051
=head2 Constructor
1052
1052
1053
- $z = new Archive::Zip::SimpleUnzip " myzipfile.zip" [, OPTIONS] ;
1054
- $z = new Archive::Zip::SimpleUnzip \$buffer [, OPTIONS] ;
1055
- $z = new Archive::Zip::SimpleUnzip $filehandle [, OPTIONS] ;
1053
+ $z = Archive::Zip::SimpleUnzip->new(' myzipfile.zip' [, OPTIONS]) ;
1054
+ $z = Archive::Zip::SimpleUnzip->new( \$buffer [, OPTIONS]) ;
1055
+ $z = Archive::Zip::SimpleUnzip->new( $filehandle [, OPTIONS]) ;
1056
1056
1057
1057
The constructor takes one mandatory parameter along with zero or more
1058
1058
optional parameters.
@@ -1117,7 +1117,7 @@ If the optional parameter $outfile is specified, the payload is written to that
1117
1117
1118
1118
Returns the comment, if any, associated with the zip archive.
1119
1119
1120
- =item $z->exists(" name" )
1120
+ =item $z->exists(' name' )
1121
1121
1122
1122
Tests for the existence of member "name" in the zip archive.
1123
1123
@@ -1139,10 +1139,10 @@ Standard usage is
1139
1139
1140
1140
use Archive::Zip::SimpleUnzip qw($SimpleUnzipError) ;
1141
1141
1142
- my $match = " hello" ;
1143
- my $zipfile = " my.zip" ;
1142
+ my $match = ' hello' ;
1143
+ my $zipfile = ' my.zip' ;
1144
1144
1145
- my $z = new Archive::Zip::SimpleUnzip $zipfile
1145
+ my $z = Archive::Zip::SimpleUnzip->new( $zipfile)
1146
1146
or die "Cannot open zip file: $SimpleUnzipError\n" ;
1147
1147
1148
1148
while (my $member = $z->next())
@@ -1215,10 +1215,10 @@ read the contents of the member
1215
1215
1216
1216
use Archive::Zip::SimpleUnzip qw($SimpleUnzipError) ;
1217
1217
1218
- my $z = new Archive::Zip::SimpleUnzip " my1.zip"
1218
+ my $z = Archive::Zip::SimpleUnzip->new(' my1.zip')
1219
1219
or die "Cannot open zip file: $SimpleUnzipError\n" ;
1220
1220
1221
- my $name = " abc.txt" ;
1221
+ my $name = ' abc.txt' ;
1222
1222
if ($z->exists($name))
1223
1223
{
1224
1224
print $z->content($name);
@@ -1232,8 +1232,8 @@ read the contents of the member
1232
1232
1233
1233
use Archive::Zip::SimpleUnzip qw($SimpleUnzipError) ;
1234
1234
1235
- my $zipfile = " my.zip" ;
1236
- my $z = new Archive::Zip::SimpleUnzip $zipfile
1235
+ my $zipfile = ' my.zip' ;
1236
+ my $z = Archive::Zip::SimpleUnzip->new( $zipfile)
1237
1237
or die "Cannot open zip file: $SimpleUnzipError\n" ;
1238
1238
1239
1239
my $members = $z->names();
@@ -1253,10 +1253,10 @@ constructor to automaticaly skip members that just contain directories.
1253
1253
1254
1254
use Archive::Zip::SimpleUnzip qw($SimpleUnzipError) ;
1255
1255
1256
- my $match = " hello" ;
1257
- my $zipfile = " my.zip" ;
1256
+ my $match = ' hello' ;
1257
+ my $zipfile = ' my.zip' ;
1258
1258
1259
- my $z = new Archive::Zip::SimpleUnzip $zipfile, FilesOnly => 1
1259
+ my $z = Archive::Zip::SimpleUnzip->new( $zipfile, FilesOnly => 1)
1260
1260
or die "Cannot open zip file: $SimpleUnzipError\n" ;
1261
1261
1262
1262
while (my $member = $z->next())
@@ -1282,10 +1282,10 @@ to get a filehandle for each member of a zip archive which it passes to C<Archi
1282
1282
my $input = shift ;
1283
1283
my $output = shift ;
1284
1284
1285
- my $unzip = new Archive::Zip::SimpleUnzip $input
1285
+ my $unzip = Archive::Zip::SimpleUnzip->new( $input)
1286
1286
or die "Cannot open '$input': $SimpleUnzipError";
1287
1287
1288
- my $zip = new Archive::Zip::SimpleZip $output, Level => Z_BEST_COMPRESSION
1288
+ my $zip = Archive::Zip::SimpleZip->new( $output, Level => Z_BEST_COMPRESSION)
1289
1289
or die "Cannot create zip file '$output': $SimpleZipError";
1290
1290
1291
1291
while (my $member = $unzip->next())
0 commit comments