This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix require’s get-magic handling for @INC elements
authorFather Chrysostomos <sprout@cpan.org>
Fri, 10 Jan 2014 13:59:39 +0000 (05:59 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 11 Jan 2014 05:29:07 +0000 (21:29 -0800)
commit6567ce247355a30b24897ffb2fc9bb1ed73c55f5
tree55229842b02b3b986a8b1a80bc54bb07a47e2ef0
parentbbc1b4cdea1c1cb2ee606d18f791bc97214123e1
Fix require’s get-magic handling for @INC elements

It was only calling get-magic before checking whether the argument was
a reference if the array was tied, which is not the only thing that
can cause an @INC element to have get-magic.  It should have been
checking for get-magic on the element itself (which is a faster
check, too).

And then there were too many FETCH calls.

I do not know whether we should be calling get-magic exactly once
when the ‘Can’t locate’ error occurs.  At least this commit reduces
the number of FETCHes.
pp_ctl.c
t/op/inccode.t