Practical mod_perl / HTML Book /



previous page: 6.6.2. Symbolic Links
  
page up: HTML Version of the book
  
next page: 6.7. Transition from mod_cgi Scripts to Apache Handlers

6.6.3. Return Codes


Apache::Registry normally assumes a return code of OK (200) and sends it for you. If a different return code needs to be sent, $r->status( ) can be used. For example, to send the return code 404 (Not Found), you can use the following code:

use Apache::Constants qw(NOT_FOUND);
$r->status(NOT_FOUND);

If this method is used, there is no need to call $r->send_http_header( ) (assuming that the PerlSendHeader Offsetting is in effect).

 

Continue to:

  • prev: 6.6.2. Symbolic Links
  • Table of Contents
  • next: 6.7. Transition from mod_cgi Scripts to Apache Handlers







TOP
previous page: 6.6.2. Symbolic Links
  
page up: HTML Version of the book
  
next page: 6.7. Transition from mod_cgi Scripts to Apache Handlers


Menu

  • HTML Book
  • PDF Book
  • Download Code
  • Table of Contents
  • Errata
  • mod_perl2 User's Guide
  • Sitemap

Search


Add to Google




Creative Commons License


Written by
Eric Cholet (Logilune) and
Stas Bekman (StasoSphere & Free Books).


[ Privacy Policy | Terms of Use | About Us | Search ]

© 2007 StasoSphere.com