> Do I need to set the SetHandler to perl-script in the AccessHandler?

yes.

  $r->handler('perl-script');

> 
> End goal is I want to check to see if theres already a physical file
> on the system and return that if there is.
> The next stage is to see if there is content stored in a DB and if
> it's newer than the file on the system use that.
> ie call weblobe2::mainhook

I don't know why you would be using a PerlAccessHandler for this.

the request cycle gives you the opportunity to decided the request's fate at
different logical points.  the PerlAccessHandler is for denying access to
content based on certain criteria, such as IP for example, so it's not
necessarily idiomatic to be doing this kind of thing there.  if you want to
dynamically serve content conditionally based on various criteria you might
want to try a PerlFixupHandler with something like the following

  if (-e $r->filename) {
    $r->handler('default-handler');
  }
  else {
    # use the configured perl-script to serve a file from a database
  }

apache's default-handler is very efficient at sending flat files, so you
probably should use it whenever possible.  placing that logic in a fixup
handler gives apache every chance to process the file "normally" with
mod_perl stepping in only at the last minute to serve the content from a
dynamic source.

HTH

--Geoff

Reply via email to