# this code is in Foo/Bar.pm package Foo::Bar; use parent qw/Exporter/; our @EXPORT = qw/baz/; sub baz { "Hello world"; } 1; #### use 5.010; use strict; use foo::bar; say Foo::Bar::baz(); # says "Hello world" #### use 5.010; use strict; use Foo::Bar; say baz(); # says "Hello world" #### use 5.010; use strict; use foo::bar; say baz(); # dies - undefined subroutine main::baz #### use 5.010; use strict; use foo::bar; say foo::bar::baz(); # dies - undefined subroutine again