perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Shapiro" <joshua.shap...@gmail.com>
Subject Testing a Handler
Date Sun, 10 Sep 2006 04:55:57 GMT
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 &amp;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

Mime
View raw message