]> git.vpit.fr Git - perl/modules/Sub-Op.git/commitdiff
Fix deparsing of sub deref
authorVincent Pit <vince@profvince.com>
Sat, 2 Jan 2010 19:59:58 +0000 (20:59 +0100)
committerVincent Pit <vince@profvince.com>
Sat, 2 Jan 2010 19:59:58 +0000 (20:59 +0100)
lib/Sub/Op.pm

index 8e380ca6835b49a9410b0753778e5a418812b292..bb2f345fbb67b2773640139be21ff6a60c1bc729 100644 (file)
@@ -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);
   };