summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-06-10 13:44:35 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-06-10 13:44:35 +0000
commit8aa2553226ffc9519afd6cbe932ce403df9c872d (patch)
treed6c485cf7001f15c8b48bf86d51c2109e46de38e /ext
parent059b24137e1883cfc569feda7b4940c7166cd078 (diff)
downloadperl-8aa2553226ffc9519afd6cbe932ce403df9c872d.tar.gz
Pre-run and disarm the code automodification run by
Compress::Zlib's Makefile p4raw-id: //depot/perl@24793
Diffstat (limited to 'ext')
-rwxr-xr-xext/Compress/Zlib/Makefile.PL6
-rw-r--r--ext/Compress/Zlib/Zlib.pm12
-rwxr-xr-xext/Compress/Zlib/examples/filtdef2
-rwxr-xr-xext/Compress/Zlib/examples/filtinf2
-rwxr-xr-xext/Compress/Zlib/examples/gzcat2
-rwxr-xr-xext/Compress/Zlib/examples/gzgrep2
-rwxr-xr-xext/Compress/Zlib/examples/gzstream2
-rw-r--r--ext/Compress/Zlib/t/01version.t2
-rw-r--r--ext/Compress/Zlib/t/02zlib.t2
-rw-r--r--ext/Compress/Zlib/t/03examples.t2
-rw-r--r--ext/Compress/Zlib/t/04encoding.t2
-rw-r--r--ext/Compress/Zlib/t/05gzsetp.t2
-rw-r--r--ext/Compress/Zlib/t/06gzdopen.t2
13 files changed, 21 insertions, 19 deletions
diff --git a/ext/Compress/Zlib/Makefile.PL b/ext/Compress/Zlib/Makefile.PL
index b8c2240160..558ce72828 100755
--- a/ext/Compress/Zlib/Makefile.PL
+++ b/ext/Compress/Zlib/Makefile.PL
@@ -351,8 +351,10 @@ sub UpDowngrade
{ return }
}
- foreach (@files)
- { doUpDown($our_sub, $warn_sub, $_) }
+ unless ($ENV{PERL_CORE}) {
+ foreach (@files)
+ { doUpDown($our_sub, $warn_sub, $_) }
+ }
warn "Up/Downgrade complete.\n" ;
exit 0 if $upgrade || $downgrade;
diff --git a/ext/Compress/Zlib/Zlib.pm b/ext/Compress/Zlib/Zlib.pm
index 2b8777eb64..0521ee6c57 100644
--- a/ext/Compress/Zlib/Zlib.pm
+++ b/ext/Compress/Zlib/Zlib.pm
@@ -18,9 +18,9 @@ use Carp ;
use IO::Handle ;
use strict ;
-local ($^W) = 1; #use warnings ;
-use vars qw($VERSION @ISA @EXPORT $AUTOLOAD);
-use vars qw($deflateDefault $deflateParamsDefault $inflateDefault);
+use warnings ;
+our ($VERSION, @ISA, @EXPORT, $AUTOLOAD);
+our ($deflateDefault, $deflateParamsDefault, $inflateDefault);
$VERSION = "1.34_01" ;
@@ -197,7 +197,7 @@ $inflateDefault = {
sub deflateInit(@)
{
my ($got) = ParseParameters($deflateDefault, @_) ;
- local ($^W) = 0; #no warnings;
+ no warnings;
croak "deflateInit: Bufsize must be >= 1, you specified $got->{Bufsize}"
unless $got->{Bufsize} >= 1;
_deflateInit($got->{Level}, $got->{Method}, $got->{WindowBits},
@@ -209,7 +209,7 @@ sub deflateInit(@)
sub inflateInit(@)
{
my ($got) = ParseParameters($inflateDefault, @_) ;
- local ($^W) = 0; #no warnings;
+ no warnings;
croak "inflateInit: Bufsize must be >= 1, you specified $got->{Bufsize}"
unless $got->{Bufsize} >= 1;
_inflateInit($got->{WindowBits}, $got->{Bufsize}, $got->{Dictionary});
@@ -222,7 +222,7 @@ sub Compress::Zlib::deflateStream::deflateParams
my ($got) = ParseParameters($deflateParamsDefault, @_) ;
croak "deflateParams needs Level and/or Strategy"
unless defined $got->{Level} || defined $got->{Strategy};
- local ($^W) = 0; #no warnings;
+ no warnings;
croak "deflateParams: Bufsize must be >= 1, you specified $got->{Bufsize}"
unless !defined $got->{Bufsize} || $got->{Bufsize} >= 1;
diff --git a/ext/Compress/Zlib/examples/filtdef b/ext/Compress/Zlib/examples/filtdef
index 5cbc882377..57dfeb9068 100755
--- a/ext/Compress/Zlib/examples/filtdef
+++ b/ext/Compress/Zlib/examples/filtdef
@@ -1,7 +1,7 @@
#!/usr/local/bin/perl
use strict ;
-local ($^W) = 1; #use warnings ;
+use warnings ;
use Compress::Zlib ;
diff --git a/ext/Compress/Zlib/examples/filtinf b/ext/Compress/Zlib/examples/filtinf
index f65ed8ce72..1df202b1d7 100755
--- a/ext/Compress/Zlib/examples/filtinf
+++ b/ext/Compress/Zlib/examples/filtinf
@@ -1,7 +1,7 @@
#!/usr/local/bin/perl
use strict ;
-local ($^W) = 1; #use warnings ;
+use warnings ;
use Compress::Zlib ;
diff --git a/ext/Compress/Zlib/examples/gzcat b/ext/Compress/Zlib/examples/gzcat
index 6c595b8f39..3bbd2972c9 100755
--- a/ext/Compress/Zlib/examples/gzcat
+++ b/ext/Compress/Zlib/examples/gzcat
@@ -1,7 +1,7 @@
#!/usr/local/bin/perl
use strict ;
-local ($^W) = 1; #use warnings ;
+use warnings ;
use Compress::Zlib ;
diff --git a/ext/Compress/Zlib/examples/gzgrep b/ext/Compress/Zlib/examples/gzgrep
index 26f8939cdf..324d3e615f 100755
--- a/ext/Compress/Zlib/examples/gzgrep
+++ b/ext/Compress/Zlib/examples/gzgrep
@@ -1,7 +1,7 @@
#!/usr/local/bin/perl
use strict ;
-local ($^W) = 1; #use warnings ;
+use warnings ;
use Compress::Zlib ;
diff --git a/ext/Compress/Zlib/examples/gzstream b/ext/Compress/Zlib/examples/gzstream
index 22d3d27b27..cb03a2c0fc 100755
--- a/ext/Compress/Zlib/examples/gzstream
+++ b/ext/Compress/Zlib/examples/gzstream
@@ -1,7 +1,7 @@
#!/usr/local/bin/perl
use strict ;
-local ($^W) = 1; #use warnings ;
+use warnings ;
use Compress::Zlib ;
diff --git a/ext/Compress/Zlib/t/01version.t b/ext/Compress/Zlib/t/01version.t
index 1a0030ae20..ea5b6a0bb4 100644
--- a/ext/Compress/Zlib/t/01version.t
+++ b/ext/Compress/Zlib/t/01version.t
@@ -1,6 +1,6 @@
use strict ;
-local ($^W) = 1; #use warnings ;
+use warnings ;
use Compress::Zlib ;
diff --git a/ext/Compress/Zlib/t/02zlib.t b/ext/Compress/Zlib/t/02zlib.t
index 995bb526e8..e4802d113f 100644
--- a/ext/Compress/Zlib/t/02zlib.t
+++ b/ext/Compress/Zlib/t/02zlib.t
@@ -1,7 +1,7 @@
use strict ;
-local ($^W) = 1; #use warnings ;
+use warnings ;
use Compress::Zlib ;
diff --git a/ext/Compress/Zlib/t/03examples.t b/ext/Compress/Zlib/t/03examples.t
index b32ef4fcd4..b5b41f8992 100644
--- a/ext/Compress/Zlib/t/03examples.t
+++ b/ext/Compress/Zlib/t/03examples.t
@@ -1,6 +1,6 @@
use strict ;
-local ($^W) = 1; #use warnings ;
+use warnings ;
sub ok
{
diff --git a/ext/Compress/Zlib/t/04encoding.t b/ext/Compress/Zlib/t/04encoding.t
index 6e4ed741ed..9d6632155f 100644
--- a/ext/Compress/Zlib/t/04encoding.t
+++ b/ext/Compress/Zlib/t/04encoding.t
@@ -1,6 +1,6 @@
use strict ;
-local ($^W) = 1; #use warnings ;
+use warnings ;
BEGIN
{
diff --git a/ext/Compress/Zlib/t/05gzsetp.t b/ext/Compress/Zlib/t/05gzsetp.t
index 97762e16d2..9988ac60cc 100644
--- a/ext/Compress/Zlib/t/05gzsetp.t
+++ b/ext/Compress/Zlib/t/05gzsetp.t
@@ -1,7 +1,7 @@
use strict ;
-local ($^W) = 1; #use warnings ;
+use warnings ;
use Compress::Zlib ;
diff --git a/ext/Compress/Zlib/t/06gzdopen.t b/ext/Compress/Zlib/t/06gzdopen.t
index 919302a274..59a0d4f423 100644
--- a/ext/Compress/Zlib/t/06gzdopen.t
+++ b/ext/Compress/Zlib/t/06gzdopen.t
@@ -1,7 +1,7 @@
use strict ;
-local ($^W) = 1; #use warnings ;
+use warnings ;
use Compress::Zlib ;