summaryrefslogtreecommitdiff
path: root/ext/Errno
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-02-19 17:38:12 +0000
committerNicholas Clark <nick@ccl4.org>2011-02-19 17:38:12 +0000
commit56d853d63a6854db92d028153be6f2aa285a68c6 (patch)
tree48277800529c6be14b34a44db81614b3e686f58d /ext/Errno
parente736dcee3f1af41c202d6752407391cb1e0a4664 (diff)
downloadperl-56d853d63a6854db92d028153be6f2aa285a68c6.tar.gz
In Errno, use typeglob aliasing instead of subref to typeglob assignment.
Typeglob aliasing saves just over .5K, because fewer internal structures are created. In the general case the behaviour of the two differs, but as the only package variables of these names are subroutines, and we are within our own namespace, there is no difference here.
Diffstat (limited to 'ext/Errno')
-rw-r--r--ext/Errno/Errno_pm.PL3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 5621abdfc7..5725de86ee 100644
--- a/ext/Errno/Errno_pm.PL
+++ b/ext/Errno/Errno_pm.PL
@@ -406,8 +406,7 @@ sub STORE {
Carp::confess("ERRNO hash is read only!");
}
-*CLEAR = \&STORE;
-*DELETE = \&STORE;
+*CLEAR = *DELETE = \*STORE; # Typeglob aliasing uses less space
sub NEXTKEY {
each %err;