This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In Perl_swash_init(), reuse any non-NULL return value from Perl_gv_fetchmeth().
Historically Perl_swash_init() called Perl_gv_fetchmeth() simply to determine
if the requested package was loaded, and if not, attempt to load it. However,
Perl_gv_fetchmeth() is actually making the same lookup as Perl_call_method()
uses to get a pointer to the relevant method. Hence if we get a non-NULL
return from Perl_gv_fetchmeth() we can pass it directly to Perl_call_sv(), and
save duplicated work.