[sorry for length, I've been wanting to ask this for a while :)]

Hello,
        I'm a bit new to coding with mod_perl (and I _am_ new to this list), 
and I have a question. :)  I have it set up now where my default page 
is index.pl, and I've got some other links (e.g. contact/about/faq) 
that are also generated from perl scripts. (I have a <Files *.pl> 
directive that puts all .pl files through ModPerl::Registry)  Reason 
they're mod_perl generated is that the index does a lot, and if the 
user is logged on it displays one thing; otherwise, something else, 
etc.  I have other normal mod_perl modules that act as handlers for 
certain URIs, based on <Location> directives.  But the more I learn, 
the more I see that I should probably stray away from individual files. 
(maybe not?)  But I always wondered how people set-up mod_perl do deal 
with different links on a large site: does one use <Location> for every 
link possible? (yeah yeah, I know)  Well, for the modules I learned how 
to parse the path_info and take from there what link needs to be 
processed.  So I decided to make my default homepage a mod_perl module.  
Then I could parse path_info and dispatch to the appropriate 
'handler' (or page renderer function) for things like [contact|faq|
about].  Is that normal?  Because I can't seem to get it to work.  How 
does one set-up the Apache config?  Is the PerlResponseHandler 
Blah::Main put under the <Directory> directive for the document root?  
What would the document root be?  How are these things typically dealt 
with when there is dynamic content (i.e. user-specific stuff) on the 
homepage?  I have a feeling 'templating' is going to be the response.  
Yeah, I should probably start looking at that. :) (Right now it's just 
the no-no of having a class that generates different parts of the page, 
filled with a lot of HTML mixed with some Perl conditionals for 
user-specific stuff)

Sorry for the length; as you can see, I'm a bit confused about the large 
site stuff.  I have "Writing Apache Modules with Perl and C" and "Web 
Development with Apache and Perl by Theo Petersen," but it just seems 
that those books don't deal with full site stuff.  The Eagle Book does 
some, but I haven't gotten my head around it all yet. (as if that isn't 
obvious)  I'm learning, but it's a new way of thinking about 
web-presentation for me.


Thanks,
jab3

Reply via email to