If this is the wrong list, please direct me to the right place. I'm trying to get Catalyst working under apache/mod_perl (works fine with the standalone server). <br><br>Basically, I have a very simple app called Registration. In apache I set it up like:
<br><br><Location /registration><br> SetHandler perl-script <br> PerlHandler Registration<br></Location><br><br>If I startup apache through the init.d script, it complains that it cant find <a href="http://Registration.pm">
Registration.pm</a> in @INC. The obvious way around this was to set the PERL5LIB env var to the path of my app lib dir, and so this does work:<br><br> PERL5LIB=/var/www/registration/lib /usr/sbin/apache2ctl start<br><br>
However, I need a way to set this way so it "sticks" on reboot, ideally so I can simply start apache through the /etc/init.d script. I suppose I could edit that script directly, but I'd rather not (and assume there is a simpler way)
<br><br>I've tried setting the variable in the apache conf, but this doesn't seem to work:<br> PerlSetEnv PERL5LIB /var/www/registration/lib<br><br>Any ideas here on what i'm missing? <br><br><br>Second question. I am using the FormValidator::Simple plugin. In my lib/Registration.pm file, I set it up like this (per the documentation):
<br><br>__PACKAGE__->config(<br> validator => {<br> messages => 'messages.yml'<br> }<br>}<br><br>Now when I startup apache (the one way I can get it to work) and hit my URL, I get the error:<br> failed to resolve handler `Registration': set hash reference or YAML file path. at /usr/local/share/perl/5.8.8/FormValidator/Simple/Messages.pm line 43\nCompilation failed in require at (eval 2) line 3.
<br><br>When I give the absolute path to messages.yml in the config above, the error resolves, however I dont want to set an absolute path here for obvious reasons. What are my options ?<br><br><br>Thanks !<br>John<br><br>
<br>