From: Rafael Garcia-Suarez Date: Fri, 10 Jun 2005 13:44:35 +0000 (+0000) Subject: Pre-run and disarm the code automodification run by X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8aa2553226ffc9519afd6cbe932ce403df9c872d;p=p5sagit%2Fp5-mst-13.2.git Pre-run and disarm the code automodification run by Compress::Zlib's Makefile p4raw-id: //depot/perl@24793 --- diff --git a/ext/Compress/Zlib/Makefile.PL b/ext/Compress/Zlib/Makefile.PL index b8c2240..558ce72 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 2b8777e..0521ee6 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 5cbc882..57dfeb9 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 f65ed8c..1df202b 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 6c595b8..3bbd297 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 26f8939..324d3e6 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 22d3d27..cb03a2c 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 1a0030a..ea5b6a0 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 995bb52..e4802d1 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 b32ef4f..b5b41f8 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 6e4ed74..9d66321 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 97762e1..9988ac6 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 919302a..59a0d4f 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 ;