apache-dispatch_trick_for_keeping__httpd.conf_clean

This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.



Subject: [ANNOUNCE] Apache-Dispatch-0.06
From: Geoffrey Young <gyoung@laserlink.net>
Date: Tue, 29 Aug 2000 11:30:06 -0400

The URL

 
http://morpheus.laserlink.net/~gyoung/modules/Apache-Dispatch-0.06.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/G/GE/GEOFF/Apache-Dispatch-0.06.tar.gz
  size: 7452 bytes
   md5: 1546415d4d9aa380567b961d395827d6

DESCRIPTION

Apache::Dispatch translates $r->uri into a class and method and runs
it as a PerlHandler.  Basically, this allows you to call PerlHandlers
as you would CGI scripts without having to load your httpd.conf with
a slurry of <Location> tags.

EXAMPLE

  in httpd.conf

    PerlModule Apache::Dispatch
    PerlModule Bar

    <Location /Foo>
      SetHandler perl-script
      PerlHandler Apache::Dispatch

      DispatchPrefix Bar
    </Location>

  in browser:
    http://localhost/Foo/baz

  the results are the same as if your httpd.conf looked like:
    <Location /Foo>
      SetHandler perl-script
      PerlHandler Bar::dispatch_baz
    </Location>

but with the additional security of protecting the class name from
the browser and keeping the method name from being called directly.
Because any class under the Bar:: hierarchy can be called, one
<Location> directive is be able to handle all the methods of Bar,
Bar::Baz, etc...

Changes:

0.06  8.29.2000
        - changed call to error_dispatch to pass $r and $@
        - documented the arguments passed to the extras
        - log the error if the handler dies and there is no 
          error_dispatch() routine defined
===


the rest of The Pile (a partial mailing list archive)

doom@kzsu.stanford.edu