Next | Hook::LexWrap | 19 |
$return = bless sub {$prereturn=1}, 'Hook::LexWrap::Cleanup'; my $dummy = $wrapper{pre}->(@_, $return) if $wrapper{pre};
But wait
What about:
In a pre-wrapper, $_[-1] is -- for obvious reasons -- undef.
Since $return is a blessed subroutine, why does the prewrapper see undef?
package Hook::LexWrap::Cleanup;
use overload q{""} => sub { undef }, q{0+} => sub { undef }, q{bool} => sub { undef };
The object is overloaded to look like undef even though it isn't
Next | Copyright © 2003 M. J. Dominus |