| Next | Hook::LexWrap | 9 |
The manual claims lexically scoped wrappers:
{
my $dummy = wrap 'foo', pre => ..., post => ...;
foo(...); # Pre and post wrappers are called
}
foo(...); # Pre and post wrappers are not called
Actually, this is a lie
The wrappers are dynamically scoped
{
my $dummy = wrap 'foo', pre => ..., post => ...;
bar();
# END OF LEXICAL SCOPE
}
sub bar {
foo(); # Pre and post wrappers are called anyway
}
So much for Hook::LexWrap
| Next | ![]() |
Copyright © 2003 M. J. Dominus |