This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Correct err msg when calling stub w/no autoload fb
[perl5.git] / pp_hot.c
index 77b707c..38c49a0 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2648,15 +2648,15 @@ try_autoload:
            {
                cv = GvCV(autogv);
            }
-           /* sorry */
            else {
+              sorry:
                sub_name = sv_newmortal();
                gv_efullname3(sub_name, gv, NULL);
                DIE(aTHX_ "Undefined subroutine &%"SVf" called", SVfARG(sub_name));
            }
        }
        if (!cv)
-           DIE(aTHX_ "Not a CODE reference");
+           goto sorry;
        goto retry;
     }