Next Hook::LexWrap 8

Examples of Tricky Features

        use Hook::LexWrap;
        use Carp 'croak';
        sub foo {  croak "Aborting" }
        wrap foo , pre => sub { @_ = ($_[0] * 2) };
        @a = (1);
        $z = foo(@a);
        Aborting at Test3.pl line 6
                main::foo() called at Test3.pl line 11
        Aborting at Hook::LexWrap.pm line 52


Next Copyright © 2003 M. J. Dominus