http://www.perlmonks.org?node_id=273117


in reply to Exporting functions into main namespace for the benefit of other use'd modules

My first reaction is that this is a bad idea, it means that your modules are relying on certain functions to exist in the 'main' namespace. It would seem to me to be clearer to simply have a use Foo::Utility qw/:common/; at the top of each of these modules, that means your modules are only relying on things they have control over. That also has the benefit of meaning you can now say

my $id = get_id();

That alone will probably save you typing, which seems to be what you were worried about in the first place. If you were worried about actually loading the module multiple times, don't, perl only loads it once.

Exporter will give you everything you need to do in Foo::Utility with very little effort (if you weren't already aware of it).