From: Vincent Pit Date: Sat, 2 Jan 2010 19:59:58 +0000 (+0100) Subject: Fix deparsing of sub deref X-Git-Tag: v0.01~4 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=cca835349c605e0526dc400c6224e4551bf8b54a;p=perl%2Fmodules%2FSub-Op.git Fix deparsing of sub deref --- diff --git a/lib/Sub/Op.pm b/lib/Sub/Op.pm index 8e380ca..bb2f345 100644 --- a/lib/Sub/Op.pm +++ b/lib/Sub/Op.pm @@ -331,7 +331,7 @@ sub _inject { $B_OP_inject{can} = sub { my ($obj, $meth) = @_; if ($meth eq 'first') { - return undef unless defined _custom_name($obj); + return undef unless $obj->isa('B::UNOP') or defined _custom_name($obj); } $obj->SUPER::can($meth); };