sub _ { 'compile time '.@_}; local *_ = sub { 'run time '.@_}; # the above is what your module/init code does my $c = _(1); die $c; __END__ run time 1 at - line 6.