[Catalyst] Missing Apache::Request Sanity Check
Juan Camacho
jc5826 at gmail.com
Mon Sep 19 20:20:12 CEST 2005
I was installing a catalyst application on a new machine and I
couldn't figure out why catalyst was complaining about `Can't locate
object method "components"` under Apache::Registry until I figured out
that Apache::Request wasn't installed on that machine.
Not sure why it's is not caught earlier in
Catalyst::Engine::Apache::Base::prepare_request for example.
sub prepare_request {
my ( $c, $r ) = @_;
carp "Apache::Request object not defined" unless $r; ## <---
maybe this should be added
$c->apache($r);
}
... or even earlier in Catalyst::Setup::setup_engine
if ( Apache::Request->require ) {
$engine = 'Catalyst::Engine::Apache::MP13::Apreq';
} else {
carp "Apache::Request module not found";
}
After finding this, I made sure that I put Apache::Request in my
application pre-reqs check, but it *might be* a good idea as a general
philosophy that Catalyst bail out as early as possible with things
like this.
More information about the Catalyst
mailing list