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).

Basically, I have a very simple app called Registration. In apache I set it
up like:

<Location /registration>
SetHandler perl-script
PerlHandler Registration
</Location>

If I startup apache through the init.d script, it complains that it cant
find Registration.pm 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:

 PERL5LIB=/var/www/registration/lib  /usr/sbin/apache2ctl start

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)

I've tried setting the variable in the apache conf, but this doesn't seem to
work:
PerlSetEnv  PERL5LIB  /var/www/registration/lib

Any ideas here on what i'm missing?


Second question.  I am using the FormValidator::Simple plugin.  In my
lib/Registration.pm file, I set it up like this (per the documentation):

__PACKAGE__->config(
 validator => {
   messages => 'messages.yml'
}
}

Now when I startup apache (the one way I can get it to work) and hit my URL,
I get the error:
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.

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 ?


Thanks !
John
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to