amitsq has asked for the wisdom of the Perl Monks concerning the following question:
The specified CGI application encountered an error and the server terminated the process.
Both files are in the same directory, i use windows-active state perl and i want to work with packages.file hello-2.pl
#!d:\perl\bin\perl.exe use warnings; use strict; use Hello; #this line causes the error print"Content-type:text/html;charset=UTF-8\n\n" ; Hello->hello();
file Hello.pm
#!d:\perl\bin\perl.exe use warnings; use strict; package Hello; use Exporter; my @ISA = ('Exporter'); my @EXPORT = ('hello'); sub hello { print "Hello, world\n"; } 1;
Executed on the console it prints "hello, world". In the browser there is "The specified CGI application encountered an error and the server terminated the process." unless I remove the line "use Hello". So if I would delete the include of the hello package, it would work. What is wrong with "use Hello"?
|
|---|