This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
gv.c: Removed redundant len==1 check
authorFather Chrysostomos <sprout@cpan.org>
Tue, 5 Nov 2013 13:48:44 +0000 (05:48 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 5 Nov 2013 14:15:15 +0000 (06:15 -0800)
When I added this in ea238638, I put the same code in the branches
for the main stash and other stashes.  In the main stash branch, this
occurs in a switch that is solely for one-character names, so checking
the length again is superfluous.

gv.c

diff --git a/gv.c b/gv.c
index 62652fe..f600942 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -2023,7 +2023,7 @@ S_gv_magicalize(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len,
        break;
        case 'a':
        case 'b':
-           if (len == 1 && sv_type == SVt_PV)
+           if (sv_type == SVt_PV)
                GvMULTI_on(gv);
        }
     }