use Context::Handle; sub wrapper { my $rv = context_sensitive { call_something_else() }; # do anything here $rv->return; }