Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Devel-StackTrace CPAN distribution.

Report information
The Basics
Id: 61171
Status: rejected
Priority: 0/
Queue: Devel-StackTrace

People
Owner: Nobody in particular
Requestors: icestar [...] inbox.ru
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: Warning from Devel-StackTrace: Called UNIVERSAL::isa() as a function, not a method
Hello. After upgrade from Exception-Class-1.29 to Exception-Class-1.32 I've started to get a lot of warnings from Devel-StackTrace module in my tests like: "Called UNIVERSAL::isa() as a function, not a method at /usr/lib64/ perl5/site_perl/5.8.8/Devel/StackTrace.pm line 123" I found this (123) line in Devel-StackTrace, here is it: return 0 if grep { $_[0]{caller}[0]->isa($_) } keys %i_class; I put debug output on $_[0]{caller}[0] variable and see that this warnings is printed when 'main' sting stored in this variable. Actually I don't know if this is the problem in Exception-Class module or Devel-StackTrace, tell me and I move it to Devel-StackTrace.
Subject: Re: [rt.cpan.org #61171] Warning from Devel-StackTrace: Called UNIVERSAL::isa() as a function, not a method
Date: Wed, 8 Sep 2010 09:49:03 -0500 (CDT)
To: Dmitry Bigunyak via RT <bug-Exception-Class [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Wed, 8 Sep 2010, Dmitry Bigunyak via RT wrote: Show quoted text
> After upgrade from Exception-Class-1.29 to Exception-Class-1.32 I've > started to get a lot of warnings from Devel-StackTrace module in my > tests like: > "Called UNIVERSAL::isa() as a function, not a method at /usr/lib64/ > perl5/site_perl/5.8.8/Devel/StackTrace.pm line 123" > I found this (123) line in Devel-StackTrace, here is it: > return 0 if grep { $_[0]{caller}[0]->isa($_) } keys %i_class; > I put debug output on $_[0]{caller}[0] variable and see that this > warnings is printed when 'main' sting stored in this variable. > Actually I don't know if this is the problem in Exception-Class module > or Devel-StackTrace, tell me and I move it to Devel-StackTrace.
I'm not sure what the problem is, but without code to reproduce it, I'm not sure what I can do. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/
BTW, this warning is generated by the UNIVERSAL::isa module, which is loaded by Test::MockObject. UNIVERSAL::isa is known to get the warning wrong, and is a seriously problematic module.
From: icestar [...] inbox.ru
On Wed Sep 08 10:53:41 2010, DROLSKY wrote: Show quoted text
> BTW, this warning is generated by the UNIVERSAL::isa module, which is > loaded by Test::MockObject. UNIVERSAL::isa is known to get the warning > wrong, and is a seriously problematic module.
Sorry, it's really difficult to reproduce this warning on a small example script. But I can describe the situation on some profiler screenshots. On exception_bug3 screenshot you can see the call stack, on the top of it the Devel::StackTrace::_make_frames procedure. On exception_bug1 screenshot from the right side you can find the dump of @$raw array, the 40 and 41 items particularly. On the exception_bug2 screenshot we are inside the _make_frame_filter procedure with the last item from @ $raw array and in the $_[0]{caller}[0] variable the 'main' string stored, here I get mentioned warning. So, I think you should be ready to get 'main' string in $_[0]{caller} [0] variable and in this case you shouldn't call isa method on it in that way.
Subject: exception_bug2.jpg
Download exception_bug2.jpg
image/jpeg 349.3k
exception_bug2.jpg
Subject: exception_bug3.jpg
Download exception_bug3.jpg
image/jpeg 150.4k
exception_bug3.jpg
Subject: exception_bug1.jpg
Download exception_bug1.jpg
image/jpeg 423.4k
exception_bug1.jpg
From: icestar [...] inbox.ru
Show quoted text
> > Sorry, it's really difficult to reproduce this warning on a small > example script. But I can describe the situation on some profiler > screenshots. > On exception_bug3 screenshot you can see the call stack, on the top
of Show quoted text
> it the Devel::StackTrace::_make_frames procedure. On exception_bug1 > screenshot from the right side you can find the dump of @$raw array, > the 40 and 41 items particularly. On the exception_bug2 screenshot we > are inside the _make_frame_filter procedure with the last item from @ > $raw array and in the $_[0]{caller}[0] variable the 'main' string > stored, here I get mentioned warning. > So, I think you should be ready to get 'main' string in $_[0]{caller} > [0] variable and in this case you shouldn't call isa method on it in > that way.
I'm very sorry about my bug report, I've found the real cause of this warning. The problem in Test::Deep module, it redefines isa procedure in the 'main' package, UNIVERSAL::isa detects that and throws this warning. :(