For this platform, cachegrind reckons warnings->import() uses 7% fewer
instructions executed and has 9% fewer L1 cache references.
package warnings;
-our $VERSION = '1.09';
+our $VERSION = '1.10';
# Verify that we're called correctly so that warnings will work.
# see also strict.pm.
{
shift;
- my $catmask ;
- my $fatal = 0 ;
- my $no_fatal = 0 ;
-
my $mask = ${^WARNING_BITS} ;
if (vec($mask, $Offsets{'all'}, 1)) {
$mask |= $DeadBits{'all'} if vec($mask, $Offsets{'all'}+1, 1);
}
- push @_, 'all' unless @_;
+ unless (@_) {
+ # This is equivalent to @_ = 'all' ;
+ return ${^WARNING_BITS} = $mask | $Bits{all} ;
+ }
+
+ my $catmask ;
+ my $fatal = 0 ;
+ my $no_fatal = 0 ;
foreach my $word ( @_ ) {
if ($word eq 'FATAL') {
package warnings;
-our $VERSION = '1.09';
+our $VERSION = '1.10';
# Verify that we're called correctly so that warnings will work.
# see also strict.pm.
{
shift;
- my $catmask ;
- my $fatal = 0 ;
- my $no_fatal = 0 ;
-
my $mask = ${^WARNING_BITS} ;
if (vec($mask, $Offsets{'all'}, 1)) {
$mask |= $DeadBits{'all'} if vec($mask, $Offsets{'all'}+1, 1);
}
- push @_, 'all' unless @_;
+ unless (@_) {
+ # This is equivalent to @_ = 'all' ;
+ return ${^WARNING_BITS} = $mask | $Bits{all} ;
+ }
+
+ my $catmask ;
+ my $fatal = 0 ;
+ my $no_fatal = 0 ;
foreach my $word ( @_ ) {
if ($word eq 'FATAL') {