use Sub::Prepend 'prepend'; sub foo ($) { print "Foo executed with \@_ = (@_).\n"; } BEGIN { prepend foo => sub { # This is called before foo executes. print "Foo was called with \@_ = (@_).\n"; }; } my @bar = qw/ foo bar baz /; foo(@bar); # The prototype is preserved! __END__ Foo was called with @_ = (3). Foo executed with @_ = (3).