Next | Hook::LexWrap | 8 |
caller pretends that the wrappers are not there
use Hook::LexWrap; use Carp 'croak';
sub foo { croak "Aborting" }
wrap foo , pre => sub { @_ = ($_[0] * 2) };
@a = (1); $z = foo(@a);
You get:
Aborting at Test3.pl line 6 main::foo() called at Test3.pl line 11
Instead of:
Aborting at Hook::LexWrap.pm line 52
Next | Copyright © 2003 M. J. Dominus |