develooper Front page | perl.perl5.porters | Postings from March 2007

Re: [ANNOUNCE] Test::More/Simple/Builder 0.68

Thread Previous | Thread Next
From:
Michael G Schwern
Date:
March 14, 2007 21:46
Subject:
Re: [ANNOUNCE] Test::More/Simple/Builder 0.68
Message ID:
45F87301.8070209@pobox.com
Nicholas Clark wrote:
> Does anything spring to mind as to the cause?

Might be the changes to Test::Builder->is_fh.

--- local/Test-Simple/lib/Test/Builder.pm       (revision 27379)
+++ local/Test-Simple/lib/Test/Builder.pm       (revision 27380)
@@ -1321,11 +1321,10 @@

     return 1 if ref \$maybe_fh eq 'GLOB'; # its a glob

-    return UNIVERSAL::isa($maybe_fh,               'GLOB')       ||
-           UNIVERSAL::isa($maybe_fh,               'IO::Handle') ||
-
+    return eval { $maybe_fh->isa("GLOB") }       ||
+           eval { $maybe_fh->isa("IO::Handle") } ||
            # 5.5.4's tied() and can() doesn't like getting undef
-           UNIVERSAL::can((tied($maybe_fh) || ''), 'TIEHANDLE');
+           eval { (tied($maybe_fh) || '')->can('TIEHANDLE') };
 }

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About