B::Deparse: handle blessed code refs in coderef2text
Stephen McCamant [Sat, 25 May 2002 21:52:16 +0000 (14:52 -0700)]
Message-ID: <15600.27136.853114.694744@soda.csua.berkeley.edu>

p4raw-id: //depot/perl@16797

ext/B/B/Deparse.pm

index b10c1fb..924f436 100644 (file)
@@ -586,7 +586,7 @@ sub compile {
 sub coderef2text {
     my $self = shift;
     my $sub = shift;
-    croak "Usage: ->coderef2text(CODEREF)" unless ref($sub) eq "CODE";
+    croak "Usage: ->coderef2text(CODEREF)" unless UNIVERSAL::isa($sub, "CODE");
 
     $self->init();
     return $self->indent($self->deparse_sub(svref_2object($sub)));