Garrison Hoffman wrote:
On Mon, 2004-07-26 at 13:25, Randy Kobes wrote:


Does it help to have
  return Apache::OK;
as the last line in the handler? (you might also want to
return Apache::SERVER_ERROR, and log the
$Text::Template::ERROR, if that case arose).


It does indeed.  Can someone explain what's happening here (my other
scripts don't require return Apache::OK;) or point me to some
documentation I should have read?

Thanks for your help.

All handlers require a return status. You can read more about this here: http://perl.apache.org/docs/2.0/user/handlers/intro.html#What_are_Handlers_ http://perl.apache.org/docs/2.0/user/handlers/intro.html#Handler_Return_Values

In Perl if you don't have an explicit return() call in a subroutine, the result of the last expression is used as a return value. so your other subs had happened to work if they were returning an Apache::OK (whose int value is 0).

--
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Reply via email to