use B; sub LogMe{ #calling other subroutines and do a lot of stuff print "logme is called\n"; B->new; B->_func2; };