SPUG: mod_perl questions
kevin-spug at fink.com
Sun Nov 1 16:17:29 PST 2009
I'm building a fancy web redirector (can't say much about it beyond
that) using mod_perl, but I'm finding that an awful lot of the
literature out there (not to mention ALL of my limited experience) is
rather outdated. It seems there is a plethora of modules, books,
websites, etc discussing mod_perl wrt Apache 1.x, but there have been
a lot of changes since then and I keep running into things that just
don't work quite the same.
I know a bunch of you are quite good at mod_perl (or at least were
good enough to make me think you were back when you worked for me...
:-) so I'm hoping for some pointers, both to general
literature/websites/etc that I should be familiar with, as well as to
some specific answers.
I am using the standard Test and Test::More modules to do most of my
unit testing, as I have my various functional areas separated from the
mod_perl-specific handlers. However, I would like to be able to unit
test the mod_perl-specific stuff. Right now I'm doing some very simple
stuff using Test::MockObject to create my $r, but it's kind of clunky.
I tried using Test::Environment::Plugin::Apache2 but couldn't get it
to work properly. I'm assuming I should be using Apache::Test but
haven't found a good tutorial for it. Thoughts?
I plan on doing two different kinds of logging - detailed logging of
the requests and disposition of said requests, and logging of the
intermediate external API calls that happen during the handling of the
requests. My initial reading pointed me towards Apache::LogFile but
that module seems to be woefully out of date - it isn't available in
my Debian distribution, and I couldn't install it manually, as it
required stuff that looks like it was from Apache 1.x. I could log
directly to a DB (the data will end up in MySQL eventually, and this
should be low-volume enough that performance shouldn't be an issue)
but I'm not sure the best place to start with that. I saw a message
from Ivan a while back talking about Apache::DBI but that doesn't seem
to be available on my system (or at least I can't seem to find it -
probably looking in the wrong place.) Pointers?
Thanks in advance,
More information about the spug-list