#REMEBERED TO CHANGE THE MODULE NAME HERE use Module::With::New::PackageName; sub generate{ #open a temp file. my $workbook = Spreadsheet::WriteExcel->new( $filehandle ); #PROGRAM DOES NOT REACH THIS POINT! write_form( ... ); #close the sheet. #open the temp file and return the content as a string. } sub write_form{ #do something #FORGOT TO REPLACE NAME HERE Module::With::Old::PackageName::perform_action(); #do some more }