Skip Menu |

This queue is for tickets about the IPC-Run3 CPAN distribution.

Report information
The Basics
Id: 47864
Status: rejected
Priority: 0/
Queue: IPC-Run3

People
Owner: Nobody in particular
Requestors: adamk [...] cpan.org
Cc:
AdminCc:

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



Subject: Stop the use of eval { $something->isa('IO::Handle') }
The following needs to be upgraded to use either Scalar::Util::blessed, or a cloned copy of Params::Util::_HANDLE. It's more correct that way, and more importantly it's generating a crap-ton of spurious DIE handler events in Padre's debugging code. sub _type { my ( $redir ) = @_; return "FH" if eval { $redir->isa("IO::Handle") }; my $type = ref $redir; return $type eq "GLOB" ? "FH" : $type; }
Does the following address your concerns? --- lib/IPC/Run3.pm.orig 2009-10-06 14:47:18.000000000 +0200 +++ lib/IPC/Run3.pm 2009-10-06 15:02:25.000000000 +0200 @@ -284,7 +284,7 @@ sub _type { my ( $redir ) = @_; - return "FH" if eval { $redir->isa("IO::Handle") }; + return "FH" if UNIVERSAL::isa($redir, "IO::Handle"); my $type = ref $redir; return $type eq "GLOB" ? "FH" : $type; }
What's the real problem? Is there a reason you can't ignore death when $^S is true? -- rjbs
CC: adamk [...] cpan.org
Subject: Re: [rt.cpan.org #47864] Stop the use of eval { $something->isa('IO::Handle') }
Date: Wed, 7 Oct 2009 14:47:21 +1100
To: bug-IPC-Run3 [...] rt.cpan.org
From: Adam Kennedy <adamkennedybackup [...] gmail.com>
At this point, I kind of forget why I filed this originally. :) Using UNIVERSAL::isa is far far worse, I've got code that relies on overloading isa to call itself a handle. :( Adam K 2009/10/7 RSCHUPP via RT <bug-IPC-Run3@rt.cpan.org>: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=47864 > > > Does the following address your concerns? > > --- lib/IPC/Run3.pm.orig        2009-10-06 14:47:18.000000000 +0200 > +++ lib/IPC/Run3.pm     2009-10-06 15:02:25.000000000 +0200 > @@ -284,7 +284,7 @@ > >  sub _type { >     my ( $redir ) = @_; > -    return "FH" if eval { $redir->isa("IO::Handle") }; > +    return "FH" if UNIVERSAL::isa($redir, "IO::Handle"); >     my $type = ref $redir; >     return $type eq "GLOB" ? "FH" : $type; >  } > > >
So I guess we'll just pretend this ticket never happened. :-) -- rjbs