package Example::Foo; use strict; use warnings; use Example::Foo::One; my $obj = new Example::Foo; $obj->One(); sub new { my $self = shift; return bless {}, $self; } sub One { my $self = shift; my @caller = caller(); print "Example::Foo::One called, caller is $caller[0], line $caller[2]\n"; print "...Ref self is: ".(ref $self)."\n"; $self->Two(); } sub Two { my $self = shift; my $one = new Example::Foo::One('arg' => 'value'); ## Line of interest } 1;