package EXAMPLE; use strict; use warnings; sub import{ my $context = caller; my $symbol = "$context\:\:my_dirt_sneaky_object_reference"; warn $context; warn $symbol; { no strict 'refs'; *$symbol = \EXAMPLE->new; } } sub new{ my $class = shift; my $self = {}; return bless $self, $class; } sub my_example_method{ print "hi, I am here!"; } #### #!/usr/bin/perl use lib '/path/to/whateveryoulike'; use EXAMPLE; $my_dirt_sneaky_object_reference->my_example_method;