In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/b9929960b4602ae88b3f04bf15fa8cd2bf8a5c05?hp=480c67241f1595db244990ae2327660f1eec3602>

- Log -----------------------------------------------------------------
commit b9929960b4602ae88b3f04bf15fa8cd2bf8a5c05
Author: Nicholas Clark <n...@ccl4.org>
Date:   Sun Feb 17 09:16:01 2013 +0100

    In warnings.pm, delete a hash slice, instead of using a loop.
    
    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.
-----------------------------------------------------------------------

Summary of changes:
 lib/warnings.pm   |    4 ++--
 regen/warnings.pl |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/warnings.pm b/lib/warnings.pm
index 5777723..cafda2d 100644
--- a/lib/warnings.pm
+++ b/lib/warnings.pm
@@ -5,7 +5,7 @@
 
 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.
@@ -577,7 +577,7 @@ sub warnif
 
 # 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;
 
diff --git a/regen/warnings.pl b/regen/warnings.pl
index e0f3583..93b26fe 100644
--- a/regen/warnings.pl
+++ b/regen/warnings.pl
@@ -439,7 +439,7 @@ read_only_bottom_close_and_rename($pm);
 __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.
@@ -825,6 +825,6 @@ sub warnif
 
 # 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;

--
Perl5 Master Repository

Reply via email to