use strict; use Hook::LexWrap; sub some_sub{ print "@_"; } sub before{ $_[-1] = 'short-circuit'; # remove the last arg, which was inserted by Hook::LexWrap pop; # try to call the original sub with new args, # does not work and falls into recursion some_sub ( 'new arg', @_); } wrap some_sub, pre => \&before; some_sub(1,2,3);