in reply to Controlling the start and endings of method calls

What you're looking for is something that for instance Hook::WrapSub provides. Other similar modules include Class::Hook, but there are many more. Searching on "Hook" gives you enough to get, err, dizzy ;)

The documentation for Hook::WrapSub has some suggestions that apply directly to your requirements:

use Hook::WrapSub qw( wrap_subs ); wrap_subs \&before, 'some_func', 'another_func', \&after; sub before { croak "No arguments allowed!" if @_; # but if you're wrapping object methods, you might want to take # the object reference (i.e. $self) into account: # croak "No arguments allowed" if @_ > 1; } sub after { print "Always the same <html>..."; } # your subs follow