Next Hook::LexWrap 19

Altering the Return Value: Prewrappers

        $return = bless sub {$prereturn=1}, 'Hook::LexWrap::Cleanup';
        my $dummy = $wrapper{pre}->(@_, $return) if $wrapper{pre};
        In a pre-wrapper, $_[-1] is -- for obvious reasons -- undef. 

        package Hook::LexWrap::Cleanup;
        use overload 
                q{""}   => sub { undef },
                q{0+}   => sub { undef },
                q{bool} => sub { undef };


Next Copyright © 2003 M. J. Dominus