X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FSub%2FOp.pm;h=bb2f345fbb67b2773640139be21ff6a60c1bc729;hb=cca835349c605e0526dc400c6224e4551bf8b54a;hp=1702f3ee49e731d9efe9ea53b62943571b3a2ad1;hpb=a2cacd5001fc982edeb39a4262079c6661ceb2f4;p=perl%2Fmodules%2FSub-Op.git diff --git a/lib/Sub/Op.pm b/lib/Sub/Op.pm index 1702f3e..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); }; @@ -374,7 +374,7 @@ BEGIN { _monkeypatch() } =head1 EXAMPLES -See the F directory that implements a complete example. +See the F directory that implements a complete example. =head1 DEPENDENCIES