This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix the error message "Can't call method "DOES" on unblessed
[perl5.git] / pp_hot.c
index 83ed613..2f2876b 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -3024,6 +3024,7 @@ S_method_common(pTHX_ SV* meth, U32* hashp)
                     && SvOBJECT(ob))))
     {
        Perl_croak(aTHX_ "Can't call method \"%s\" on unblessed reference",
                     && SvOBJECT(ob))))
     {
        Perl_croak(aTHX_ "Can't call method \"%s\" on unblessed reference",
+                  (SvSCREAM(meth) && strEQ(name,"isa")) ? "DOES" :
                   name);
     }
 
                   name);
     }