sub import { my $class = shift; my $caller = (caller)[0]; { # limit the scope of unstrict refs no strict 'refs'; for my $f (@_) { *{"$caller\::$f"} = sub { print "$f\n" }; } } }