package Test1; use from; sub new { return bless {}; } sub hello { my $from = from(); print "Hello, ", $from, "\n"; $from->hello(); } package Test2; sub new { return bless {}; } *from = \&DB::from; sub test { Test1->new->hello; } sub hello { my $from = from(); print "Pleased to meet you, ", $from, "\n"; } package Main; my $test = Test2->new; $test->test;