NAME Hook::LexWrap - Lexically scoped subroutine wrappers VERSION version 0.26 SYNOPSIS use Hook::LexWrap; sub doit { print "[doit:", caller, "]"; return {my=>"data"} } SCOPED: { wrap doit => pre => sub { print "[pre1: @_]\n" }, post => sub { print "[post1:@_]\n"; $_[1]=9; }; my $temporarily = wrap doit => post => sub { print "[post2:@_]\n" }, pre => sub { print "[pre2: @_]\n "}; @args = (1,2,3);
{{#tags}}- {{label}}
{{/tags}}