From: Jarkko Hietaniemi Date: Tue, 9 Sep 2003 06:59:52 +0000 (+0000) Subject: In trying to save space, the warnings.pl change (#21107) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=53610d0bd42b53473db45197fdfabc36caa55679;p=p5sagit%2Fp5-mst-13.2.git In trying to save space, the warnings.pl change (#21107) pulled in attributes.pm... and the change didn't seem to be that well tested with different configurations. Retract #21119, #21117, #21107. p4raw-id: //depot/perl@21124 --- diff --git a/lib/warnings.pm b/lib/warnings.pm index edbe1a7..705548a 100644 --- a/lib/warnings.pm +++ b/lib/warnings.pm @@ -6,7 +6,7 @@ package warnings; -our $VERSION = '1.03'; +our $VERSION = '1.02'; =head1 NAME @@ -131,9 +131,9 @@ See L and L. =cut -use Carp (); +use Carp ; -our %Offsets : unique = ( +%Offsets = ( # Warnings Categories added in Perl 5.008 @@ -190,7 +190,7 @@ our %Offsets : unique = ( 'assertions' => 94, ); -our %Bits : unique = ( +%Bits = ( 'all' => "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55", # [0..47] 'ambiguous' => "\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00", # [29] 'assertions' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40", # [47] @@ -241,7 +241,7 @@ our %Bits : unique = ( 'y2k' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10", # [46] ); -our %DeadBits : unique = ( +%DeadBits = ( 'all' => "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", # [0..47] 'ambiguous' => "\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00", # [29] 'assertions' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80", # [47] @@ -301,7 +301,7 @@ $All = "" ; vec($All, $Offsets{'all'}, 2) = 3 ; sub Croaker { delete $Carp::CarpInternal{'warnings'}; - Carp::croak(@_); + croak(@_); } sub bits @@ -470,10 +470,10 @@ sub warn my $message = pop ; my ($callers_bitmask, $offset, $i) = __chk(@_) ; - Carp::croak($message) + croak($message) if vec($callers_bitmask, $offset+1, 1) || vec($callers_bitmask, $Offsets{'all'}+1, 1) ; - Carp::carp($message) ; + carp($message) ; } sub warnif @@ -489,11 +489,11 @@ sub warnif (vec($callers_bitmask, $offset, 1) || vec($callers_bitmask, $Offsets{'all'}, 1)) ; - Carp::croak($message) + croak($message) if vec($callers_bitmask, $offset+1, 1) || vec($callers_bitmask, $Offsets{'all'}+1, 1) ; - Carp::carp($message) ; + carp($message) ; } 1; diff --git a/warnings.pl b/warnings.pl index 6177952..eff8d60 100644 --- a/warnings.pl +++ b/warnings.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -$VERSION = '1.02'; +$VERSION = '1.01'; BEGIN { push @INC, './lib'; @@ -414,7 +414,7 @@ while () { #$list{'all'} = [ $offset .. 8 * ($warn_size/2) - 1 ] ; $last_ver = 0; -print PM "our %Offsets : unique = (\n" ; +print PM "%Offsets = (\n" ; foreach my $k (sort { $a <=> $b } keys %ValueToName) { my ($name, $version) = @{ $ValueToName{$k} }; $name = lc $name; @@ -430,7 +430,7 @@ foreach my $k (sort { $a <=> $b } keys %ValueToName) { print PM " );\n\n" ; -print PM "our %Bits : unique = (\n" ; +print PM "%Bits = (\n" ; foreach $k (sort keys %list) { my $v = $list{$k} ; @@ -444,7 +444,7 @@ foreach $k (sort keys %list) { print PM " );\n\n" ; -print PM "our %DeadBits : unique = (\n" ; +print PM "%DeadBits = (\n" ; foreach $k (sort keys %list) { my $v = $list{$k} ; @@ -475,7 +475,7 @@ __END__ package warnings; -our $VERSION = '1.03'; +our $VERSION = '1.02'; =head1 NAME @@ -600,7 +600,7 @@ See L and L. =cut -use Carp (); +use Carp ; KEYWORDS @@ -609,7 +609,7 @@ $All = "" ; vec($All, $Offsets{'all'}, 2) = 3 ; sub Croaker { delete $Carp::CarpInternal{'warnings'}; - Carp::croak(@_); + croak(@_); } sub bits @@ -778,10 +778,10 @@ sub warn my $message = pop ; my ($callers_bitmask, $offset, $i) = __chk(@_) ; - Carp::croak($message) + croak($message) if vec($callers_bitmask, $offset+1, 1) || vec($callers_bitmask, $Offsets{'all'}+1, 1) ; - Carp::carp($message) ; + carp($message) ; } sub warnif @@ -797,11 +797,11 @@ sub warnif (vec($callers_bitmask, $offset, 1) || vec($callers_bitmask, $Offsets{'all'}, 1)) ; - Carp::croak($message) + croak($message) if vec($callers_bitmask, $offset+1, 1) || vec($callers_bitmask, $Offsets{'all'}+1, 1) ; - Carp::carp($message) ; + carp($message) ; } 1;