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
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.