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: 72135
Status: resolved
Priority: 0/
Queue: Devel-StackTrace

People
Owner: Nobody in particular
Requestors: barclay.curtis [...] columbustravelmedia.com
Cc:
AdminCc:

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



Subject: Feature Request/Bug in Devel::StackTrace
Date: Thu, 3 Nov 2011 09:07:03 +0000
To: bug-Devel-StackTrace [...] rt.cpan.org
From: Barclay Curtis <barclay.curtis [...] columbustravelmedia.com>
Hi, I've recently upgraded my version of Devel::StackTrace from 1.12 to 1.27 and found an issue, however not knowing all that much about the module I wouldn't like to presume it is a bug or a feature request (possible neither). Any way in my system I am using sub classes of objects, as part of this I'm overriding the isa method (to make sure that sub classes have been retrieved from the database before determining which package they are in). Some packages I use are calling Devel::StackTrace when errors occur which in turn is calling the isa method. On lines 68 and 120 (of version 1.27) you are calling the isa method simply on an object, which will call my overridden isa method. But on line 101 you are calling UNIVERSAL::isa. Checking back to version 1.12 you seem to be using UNIVERSAL::isa more often. Would it possible to change all your isa calls to be UNIVERSAL::isa or would this break the way your package works? Devel::Stackrace version: 1.27 Perl version: v5.8.8 built for x86_64-linux-thread-multi OS: Linux 2.6.18-028stab094.3 #1 SMP Thu Sep 22 12:47:37 MSD 2011 x86_64 x86_64 x86_64 GNU/Linux Thanks for your help. Regards Barclay Curtis
Subject: Re: [rt.cpan.org #72135] Feature Request/Bug in Devel::StackTrace
Date: Thu, 3 Nov 2011 07:50:28 -0500 (CDT)
To: Barclay Curtis via RT <bug-Devel-StackTrace [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Thu, 3 Nov 2011, Barclay Curtis via RT wrote: Show quoted text
> Any way in my system I am using sub classes of objects, as part of this I'm > overriding the isa method (to make sure that sub classes have been > retrieved from the database before determining which package they are in). > Some packages I use are calling Devel::StackTrace when errors occur which > in turn is calling the isa method.
If you override isa() you need to make it act like the Perl builtin, which means not throwing an error. If you don't, you risk breaking a lot of CPAN code. Show quoted text
> Checking back to version 1.12 you seem to be using UNIVERSAL::isa more > often. > Would it possible to change all your isa calls to be UNIVERSAL::isa or > would this break the way your package works?
Calling UNIVERSAL::isa is actually broken. I need to get rid of it entirely. It explicitly avoids calling an overridden isa method, which is actually a bad thing. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/
Subject: Re: [rt.cpan.org #72135] Feature Request/Bug in Devel::StackTrace
Date: Thu, 3 Nov 2011 13:14:44 +0000
To: bug-Devel-StackTrace [...] rt.cpan.org
From: Barclay Curtis <barclay.curtis [...] columbustravelmedia.com>
Hi Dave, Thanks for the speedy response. My method does in fact call the perl builtin, just makes sure the object is complete first. So your saying in future it's likely that you'll remove the last reference to UNIVERSAL::isa? Thanks Barclay On 3 November 2011 12:50, autarch@urth.org via RT < bug-Devel-StackTrace@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=72135 > > > On Thu, 3 Nov 2011, Barclay Curtis via RT wrote: >
> > Any way in my system I am using sub classes of objects, as part of this
> I'm
> > overriding the isa method (to make sure that sub classes have been > > retrieved from the database before determining which package they are
> in).
> > Some packages I use are calling Devel::StackTrace when errors occur which > > in turn is calling the isa method.
> > If you override isa() you need to make it act like the Perl builtin, which > means not throwing an error. If you don't, you risk breaking a lot of CPAN > code. >
> > Checking back to version 1.12 you seem to be using UNIVERSAL::isa more > > often. > > Would it possible to change all your isa calls to be UNIVERSAL::isa or > > would this break the way your package works?
> > Calling UNIVERSAL::isa is actually broken. I need to get rid of it > entirely. It explicitly avoids calling an overridden isa method, which is > actually a bad thing. > > > -dave > > /*============================================================ > http://VegGuide.org http://blog.urth.org > Your guide to all that's veg House Absolute(ly Pointless) > ============================================================*/ > >
Subject: Re: [rt.cpan.org #72135] Feature Request/Bug in Devel::StackTrace
Date: Mon, 7 Nov 2011 10:53:53 -0600 (CST)
To: Barclay Curtis via RT <bug-Devel-StackTrace [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Thu, 3 Nov 2011, Barclay Curtis via RT wrote: Show quoted text
> My method does in fact call the perl builtin, just makes sure the object is > complete first.
I'm saying that if you override ->isa, you need to make it _behave_ like UNIVERSAL::isa. That means not throwing an exception. You should probably return false in cases where you throw an exception. Show quoted text
> So your saying in future it's likely that you'll remove the last reference > to UNIVERSAL::isa?
Yes. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/