We don't bite newbies here... much | |
PerlMonks |
Re: Re: Database driven web content: live or tape?by fuzzyping (Chaplain) |
on Jul 20, 2002 at 20:12 UTC ( [id://183666]=note: print w/replies, xml ) | Need Help?? |
This is an excellent solution, IMHO. I'm implementing the very same design for my DNS submission site, and the performance difference between mod_perl and non-mod_perl is breathtaking. The main (minimal) differences you'll find with coding for mod_perl is the care you must take with your scoping. It was this project, in fact, that helped me to finally understand lexicals. Abstracting the HTML via HTML::Template was a wonderful choice as well... our non-perl coders will be able to update/modify the template pages to fit our company's overall site theme. Note, however, that HTML::Template shouldn't be called directly... CGI::Application has inherited the necessary methods from HTML::Template. With respect to Apache::DBI, I don't know that it's necessary to restart your server each time you make modifications to your code. Yes, it's recommended (but is it necessary?), but I've been able to continue coding and testing without being *required* to restart. The main difference... you'll notice some namespace(?) errors in your error_log until the next time you restart. As far as performance, I can't really help you there... it's my understanding that when using mod_perl, Apache will automagically use Apache::DBI if you're using the MySQL drivers (although I might be talking out of my ass). I'll probably play with Benchmark::Timer this week to track the difference between my mod_perl and non-mod_perl scripts. Mind you, there's no difference in the code, just the interpreter. -fp
In Section
Seekers of Perl Wisdom
|
|