Hi,
I've just started using ModPerl::PerlRunPrefork and mod_perl.
I've been using plain old CGI for a while in a basic MVC framework
but got the following trouble when moving to mod_perl:
- I was manipulating @INC in a BEGIN block but wasn't working.
The main app index.pl is very basic:
use strict;
use warnings;
use App::Core Run => 'App::Engine';
I was doing the manip of @INC in the App::Engine module
within a BEGIN block but then move it to the import function of App::Engine, to
no unvail.
Is there a way to manipulate @INC without having to use a startup.pl in
mod_perl2???
As for now, I've created a startup.pl to manipulate @INC that is called when
the server is launched
but this has serveral draw backs that i would like to avoid:
- need to hardcode the path in this file (in plain old CGI relative path were
ok)
- I run serveral vhosts, each of them having a cgi-bin, each of them containing
several projects
with their particular setups, ie:
domain1.com/cgi-bin/project1/conf/config
domain1.com/cgi-bin/project2/conf/config
domain2.com/cgi-bin/project1/conf/config
...
How can I load the proper startup.pl on a per vhost, folder basis and assuring
that project2 conf in domain1.com is not going to be project1 conf or even
domain2.com project2 conf?
I really do not like to have to hardcode so manythings in so many places,
especially because i've been
using this framework in many different confs and the hassle to maintain this is
not good (compare to huh, mod_php?)
I've tried also ModPerl::RegistryPrefork but got some tremendous blank pages
that leaved no log at all.
When I was browsing the app it was ok for few clicks but if i speed the clicked
space, got just blank page
with content-length 0, 200 ok status and well, 15ms response time, like if the
App::Engine wasn't even loaded.
I have absolutely no clue on how to debug this ??
I am sorry for this long mail (i've searched for the blank page problem but got
no archives close to what i have).
Thank you
_________________________________________________________________
MSN相談党、誕生。あなたの知識で日本を変えよう。党首には押切もえが就任!
http://clk.atdmt.com/GBL/go/msnjpqja0010000017gbl/direct/01/