I was wondering if anyone has a good explanation for the following strange behaviour:
I have the following module.
#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 }
The code above worked fine before I changed the package name of a package that was used in the function write_form. After I changed the name of the module from Module::With::Old::PackageName to Module::With::New::PackageName, the program never managed to finish the execution of Spreadsheet::WriteExcel->new. Perl did not produce any error messages or warnings, it just stopped executing.
Correcting the package name in write_form fixed the problem, but I can't see the connection between the wrong package name and the error that it caused. Shouldn't Perl give me an error message when the execution reaches the wrong package name and not in some unrelated function?
By the way the application where this code is located is a web application that is created using CGI::Application, running on an IIS server with ActiveState Perl 5.8.7.
2006-10-17 Retitled by GrandFather, as per Monastery guidelines
Original title: 'Any explanations for this bug?'
In reply to silent failure with non-existant module by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |