Hi,

I have an open-source web application (Codestriker) in Perl which uses tt, 
that has the following rough FS layout:

cgi-bin/codestriker.pl
lib/Codestriker/
lib/Codestiker/Template/Plugin
...

Codestriker can be deployed as either a CGI script, or to run under mod_perl. 
 The installation process creates cgi-bin/codestriker.pl, and includes a line 
at the top:

use lib '/absolute/path/to/application';

This ensures that for mod_perl deployments, all of the supporting Codestriker 
modules in lib/ can be found and loaded.  This works fine.

I have just modified Codestriker to use a user-defined tt filter defined in 
lib/Codestriker/Template/Plugin/AutomagicLinks.pm.  This all works fine when 
Codestriker is deployed to run as an ordinary CGI script.

When running under mod_perl, I get an error like:

plugin error - Can't locate AutomagicLinks.pm in @INC (@INC contains: ....)

INC doesn't include the absolute path set in the use lib declaration in 
codestriker.pl.

I am using TT 2.0.8, Apache/1.3.19 (Unix)  (Red-Hat/Linux), mod_perl/1.24_01 
and Perl 5.6.1.

Do I need to do something special with TT under mod_perl to ensure than INC 
includes my own specific modules?  

Many thanks for any help.

Cheers,
David







_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to