in reply to Difference between executing and "using" a .pm file
I remember that there is an easy way for the module to know this difference
were you thinking of modulino?