[Catalyst] reference lib outside Catalyst web application directory

Hermida, Leandro Leandro.Hermida at fmi.ch
Tue Dec 12 16:57:07 GMT 2006


Hello,

I have the following folder hierarchy for a project which will have a
web component that is driven by Catalyst:

MyProj/
     lib/
     sql/
     web/  <--- Catalyst application dir created using catalyst.pl
         lib/
         root/
         script/
         t/

My DBIC::Schema ORM setup and files are in the top lib directory outside
of the Catalyst directory because I plan to use them in more than just
the web component.  Now when I create my Catalyst DBIC::Schema model and
then try to start the test server as I expected it couldn't instantiate
my model component because it can't locate the DBIC::Schema file in
@INC.

What is the best way to get the top-level lib directory into Catalyst's
@INC?  Should I do a "use lib '...'" somewhere in a Catalyst file?

Leandro




More information about the Catalyst mailing list