This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
toke.c, S_intuit_method: Minor parsing speedup for 'maybe_method $foo'
[perl5.git] / pp_sys.c
index ec77763..04ccddb 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -367,7 +367,7 @@ PP(pp_glob)
      * is called once and only once */
     if (SvGMAGICAL(TOPs)) TOPs = sv_2mortal(newSVsv(TOPs));
 
-    tryAMAGICunTARGETlist(iter_amg, 0, (PL_op->op_flags & OPf_SPECIAL));
+    tryAMAGICunTARGETlist(iter_amg, (PL_op->op_flags & OPf_SPECIAL));
 
     if (PL_op->op_flags & OPf_SPECIAL) {
        /* call Perl-level glob function instead. Stack args are:
@@ -493,6 +493,7 @@ PP(pp_die)
     }
     else {
        SV * const errsv = ERRSV;
+       SvGETMAGIC(errsv);
        if (SvROK(errsv)) {
            exsv = errsv;
            if (sv_isobject(exsv)) {
@@ -513,7 +514,7 @@ PP(pp_die)
                }
            }
        }
-       else if (SvPV_const(errsv, len), len) {
+       else if (SvPOK(errsv) && SvCUR(errsv)) {
            exsv = sv_mortalcopy(errsv);
            sv_catpvs(exsv, "\t...propagated");
        }