[Catalyst] reference lib outside Catalyst web applicationdirectory

Brian Kirkbride brian.kirkbride at deeperbydesign.com
Wed Dec 13 16:40:18 GMT 2006


Dave Howorth wrote:
> Matt S Trout wrote:
>> I'm asking why the web part can't be in the main app directory :)
> 
> I've been reading this thread with interest because Leandro's
> description seems to fit my situation as well. This seems like a pretty
> lame response. Does it mean that Catalyst can't be configured to live in
> a separate place from the bulk of the 'business' logic?
> 

I use separate directories because my business logic and catalyst code are in 
different SVN trees.  For me it's as simple as adding:

     use lib "$FindBin::Bin/../../MyApp/lib";

to the scripts in MyApp-Web/script/.

If you are using mod_perl for production you will need to specify both your 
MyApp-Web and MyApp paths in it's setup.

Hope that helps,
Brian Kirkbride



More information about the Catalyst mailing list