At 01:48 PM 1/10/2002 -0500, Perrin Harkins wrote:

>You can actually use subroutines without fear!  Also, reducing the amount of
>magic (i.e. all of that package generation and eval stuff that Registry
>does) can help clear up confusion.  And you can use __END__ and __DATA__.

Good point.

I started writing a handler and have something basically working.  It's still pretty 
barebones, but I'm happy with it so far, and performance is good.  It "require"-s the 
appropriate "page" module based on $r->filename, $r->path_info, and $r->document_root 
then calls that module's "run" method as a class method (both steps wrapped in 
separate evals).  Apache::Reload is reloading both handler module and "page" module as 
needed.

For file organization, I'm thinking of making all "page" modules start with a common 
namespace substring (e.g. Projectname::Page) to distinguish them from the support 
(model) modules for that site and moving them into the same directory tree that 
contains those support modules, then moving templates (currently in ./tt/*.tpl files 
relative to *.par scripts) into either that directory tree alongside the modules they 
are used by or into an entirely separate tree that only contains templates.  The 
latter is probably better for sites that have some division of labor between coders 
and HTML designers, but that's not the case on this one.

Thank you for all the help.

Matthew Pressly

Reply via email to