From: Gurusamy Sarathy Date: Sat, 28 Nov 1998 14:09:50 +0000 (+0000) Subject: more conservative version of changes#2345,2346,2347; those break X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6051dbdb749e970695dd861ca273edafbbb539cb;p=p5sagit%2Fp5-mst-13.2.git more conservative version of changes#2345,2346,2347; those break C which seems to be extensively used in the libs :-( p4raw-link: @2347 on //depot/perl: bbc8e6a4a34cbf904dc23fa18f4e503924aea3f8 p4raw-link: @2346 on //depot/perl: 659eaf7385567ca82dd230a62d6a7f51364f0d0a p4raw-link: @2345 on //depot/perl: 6b377df57679ab68ed17b736ebee0458acb25b21 p4raw-id: //depot/perl@2348 --- diff --git a/pp.c b/pp.c index 7b7eb67..0bd4842 100644 --- a/pp.c +++ b/pp.c @@ -727,11 +727,11 @@ PP(pp_defined) RETPUSHNO; switch (SvTYPE(sv)) { case SVt_PVAV: - if (AvMAX(sv) >= 0 || SvRMAGICAL(sv)) + if (AvMAX(sv) >= 0 || SvGMAGICAL(sv) || (SvRMAGICAL(sv) && mg_find(sv,'P'))) RETPUSHYES; break; case SVt_PVHV: - if (HvARRAY(sv) || SvRMAGICAL(sv)) + if (HvARRAY(sv) || SvGMAGICAL(sv) || (SvRMAGICAL(sv) && mg_find(sv,'P'))) RETPUSHYES; break; case SVt_PVCV: diff --git a/t/op/method.t b/t/op/method.t index 3372498..f1b1888 100755 --- a/t/op/method.t +++ b/t/op/method.t @@ -125,4 +125,4 @@ test(A->eee(), "new B: In A::eee, 4"); # We get a correct $autoload test(A->eee(), "new B: In A::eee, 4"); # Which sticks # this test added due to bug discovery -test(exists($unknown_package::{"ISA"}) ? "defined" : "undefined", "undefined"); +test(defined(@{"unknown_package::ISA"}) ? "defined" : "undefined", "undefined");