I am trying to establish better error handling with Embperl::Object
and 2.0b7.  As far as I can tell, my results showed no difference
between 2.0b5 and 2.0b7. Two problems:

1. First off, I could not seem to get Embperl to email errors to me,
   using the EMBPERL_MAIL_ERRORS_TO and associated configs.  Is this
   working?  Is there something else I need to do to make it work?

   Example (2.0b7 config): 
      EMBPERL_MAIL_ERRORS_TO cam@localhost
      EMBPERL_MAIL_ERRORS_LIMIT 0

2. Requesting missing documents under Embperl::Object (404 code).

   While using Embperl::Object, my preference is to return a 404 error
   when a file (say blah.html) is requested but does not exist.  I
   cannot seem to get this to happen.  I then want to use the apache
   config 'ErrorDocument' to redirect 404s to a script.
  
   I can only get a 404 message when my EMBPERL_OBJECT_BASE is not
   available.
  
   What I am doing: 
   
   (a) With EMBPERL_OBJECT_FALLBACK unset:
       Set EMBPERL_OPTIONS with one of 0,2,262144,262146
       (combinations of optDisableEmbperlErrorPage and optReturnError)
        
       Result:
       Either a 500 Error (Internal Server Error), or Embperl renders
       as much of the page as it can (ie the base, and nothing in the
       middle for the requested page).
      
   (b) Setting EMBPERL_OBJECT_FALLBACK:
       (same permutations of EMBPERL_OPTIONS)
   
       Result:
       as expected, the EMBPERL_OBJECT_FALLBACK page.
   
   There are several workarounds I can think of, but what seems to be
   the most logical to me is to use the EMBPERL_OBJECT_FALLBACK
   page to report that a file is missing and then log the error 
   using the apache request object:

   (in missing.html -- EMBPERL_OBJECT FALLBACK):
   [-
     $req = shift;
     use Apache::Log;
   
     ## for 2.0b5
     ## $req_rec->log->error(
         
     ## for 2.0b7  
     $req->apache_req->log->error(
       "File does not exist: ".$ENV{DOCUMENT_ROOT}.$ENV{REQUEST_URI}
      );
   -]
   <snip>

   This is supposed to look like the normal apache error in the logs,
   and it does.

   I would prefer to have Embperl return a 404, and then let Apache call
   what it needs to for the 404 (this way both Embperl and Non-Embperl
   pages are handled identically).  Can I make it work this way?   

Any suggestions or comments on either item would be appreciated.  If you
think I can do it a better / cleaner way -- feel free to share!

As usual, Vielen Dank!

Cameron


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to