Deleting a hash slice compiles 5 fewer ops, and executes 21 fewer than
looping over the keys to delete each in turn. Whilst this is arguably a
micro-optimisation, it does not increase obfuscation and is in code loaded
by nearly every Perl program, so feels worthwhile.
package warnings;
-our $VERSION = '1.16';
+our $VERSION = '1.17';
# Verify that we're called correctly so that warnings will work.
# see also strict.pm.
# These are not part of any public interface, so we can delete them to save
# space.
-delete $warnings::{$_} foreach qw(NORMAL FATAL MESSAGE);
+delete @warnings::{qw(NORMAL FATAL MESSAGE)};
1;
__END__
package warnings;
-our $VERSION = '1.16';
+our $VERSION = '1.17';
# Verify that we're called correctly so that warnings will work.
# see also strict.pm.
# These are not part of any public interface, so we can delete them to save
# space.
-delete $warnings::{$_} foreach qw(NORMAL FATAL MESSAGE);
+delete @warnings::{qw(NORMAL FATAL MESSAGE)};
1;