package warnings;
-our $VERSION = '1.02';
+our $VERSION = '1.03';
=head1 NAME
=cut
-use Carp ;
+use Carp ();
-%Offsets = (
+our %Offsets : unique = (
# Warnings Categories added in Perl 5.008
'assertions' => 94,
);
-%Bits = (
+our %Bits : unique = (
'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]
'y2k' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10", # [46]
);
-%DeadBits = (
+our %DeadBits : unique = (
'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]
sub Croaker
{
delete $Carp::CarpInternal{'warnings'};
- croak(@_);
+ Carp::croak(@_);
}
sub bits
my $message = pop ;
my ($callers_bitmask, $offset, $i) = __chk(@_) ;
- croak($message)
+ Carp::croak($message)
if vec($callers_bitmask, $offset+1, 1) ||
vec($callers_bitmask, $Offsets{'all'}+1, 1) ;
- carp($message) ;
+ Carp::carp($message) ;
}
sub warnif
(vec($callers_bitmask, $offset, 1) ||
vec($callers_bitmask, $Offsets{'all'}, 1)) ;
- croak($message)
+ Carp::croak($message)
if vec($callers_bitmask, $offset+1, 1) ||
vec($callers_bitmask, $Offsets{'all'}+1, 1) ;
- carp($message) ;
+ Carp::carp($message) ;
}
1;
#!/usr/bin/perl
-$VERSION = '1.01';
+$VERSION = '1.02';
BEGIN {
push @INC, './lib';
#$list{'all'} = [ $offset .. 8 * ($warn_size/2) - 1 ] ;
$last_ver = 0;
-print PM "%Offsets = (\n" ;
+print PM "our %Offsets : unique = (\n" ;
foreach my $k (sort { $a <=> $b } keys %ValueToName) {
my ($name, $version) = @{ $ValueToName{$k} };
$name = lc $name;
print PM " );\n\n" ;
-print PM "%Bits = (\n" ;
+print PM "our %Bits : unique = (\n" ;
foreach $k (sort keys %list) {
my $v = $list{$k} ;
print PM " );\n\n" ;
-print PM "%DeadBits = (\n" ;
+print PM "our %DeadBits : unique = (\n" ;
foreach $k (sort keys %list) {
my $v = $list{$k} ;
package warnings;
-our $VERSION = '1.02';
+our $VERSION = '1.03';
=head1 NAME
=cut
-use Carp ;
+use Carp ();
KEYWORDS
sub Croaker
{
delete $Carp::CarpInternal{'warnings'};
- croak(@_);
+ Carp::croak(@_);
}
sub bits
my $message = pop ;
my ($callers_bitmask, $offset, $i) = __chk(@_) ;
- croak($message)
+ Carp::croak($message)
if vec($callers_bitmask, $offset+1, 1) ||
vec($callers_bitmask, $Offsets{'all'}+1, 1) ;
- carp($message) ;
+ Carp::carp($message) ;
}
sub warnif
(vec($callers_bitmask, $offset, 1) ||
vec($callers_bitmask, $Offsets{'all'}, 1)) ;
- croak($message)
+ Carp::croak($message)
if vec($callers_bitmask, $offset+1, 1) ||
vec($callers_bitmask, $Offsets{'all'}+1, 1) ;
- carp($message) ;
+ Carp::carp($message) ;
}
1;