sub class (&) { my ($sub) = @_; $sub->(); # Do some book-keeping in the caller's namespace. }