# Stuff.pm package Stuff; use base 'Exporter'; @EXPORT = qw(new); sub new { print "this is exported new!\n" } #### # new.pl use Stuff; my $foo = Foo->new; # this works $foo->baz; my $bar = new Foo; # this doesn't $bar->baz; package Foo; sub new { my $class = shift; print "constructing a $class\n"; bless {}, $class; } sub baz { my $self = shift; print "hello from a ", ref $self, "\n"; }