[Catalyst] reference lib outside Catalyst web application directory

Jonathan Rockway jon at jrock.us
Tue Dec 12 17:12:13 GMT 2006


Hermida, Leandro wrote:
> 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?

myapp_server.pl, probably (and the other ones).  Catalyst::Test (etc.)
won't use this, though, so you should run your tests with the
appropriate -I flags (which you could do instead of changing myapp_*.pl):

     $ perl -Ilib -Iweb/lib web/script/myapp_server.pl

or
     $ prove -Ilib -Iweb/lib web/t

etc.

-- 
package JAPH;use Catalyst qw/-Debug/;($;=JAPH)->config(name => do {
$,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //,
";$;"]->[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;->setup;



More information about the Catalyst mailing list