Joshua Shapiro wrote:
Hello,
I have inherited an application that makes use of mod_perl. I have
never used it before and am currently trying to understand it. I am
trying to setup a simple CLI utility that will allow me to test the
functionality of the website offline and eventually set up unit tests.
I am trying
#!/usr/bin/perl
use MyApp;
use Apache::FakeRequest;
$req = Apache::FakeRequest->new();
MyApp::handler($request);
but the output I keep getting is,
Content-type: text/html
<h1>Software error:</h1>
<pre>Undefined subroutine &MyApp::handler called at ./test.pl
line 8.
</pre>
<p>
For help, please send mail to this site's webmaster, giving this
error message
and the time and date of the error.
</p>
[Sat Sep 9 22:52:58 2006] test.pl: Undefined subroutine
&MyApp::handler called at ./test.pl line 8.
What am I missing?
Thanks,
Joshua Shapiro
Should read:
my $req = Apache::FakeRequest->new();
MyApp::handler($req);
instead of :
$req = Apache::FakeRequest->new();
MyApp::handler($request);
Jay Scherrer