package SafeReadline; require Exporter; @ISA = 'Exporter'; @EXPORT = 'readline'; sub import { my $pkg = shift; return unless @_; my $sym = shift; $pkg->export("CORE::GLOBAL", $sym, @_); } sub readline { ... }