On Fri, Aug 29, 2008 at 9:54 AM, Jeff Pang <[EMAIL PROTECTED]> wrote:
> I have began a project, but meet some problems,:)
>
> say there are three dirs:
>
> |- cgi-bin
> |- cgi-bin - lib
> |- cgi-bin - template
>
>
> I have a script in cgi-bin, which requires the template file from template
> dir.
> This script also uses a library file (.pm) from lib dir.
> Finally the library need to require the former template file too.
>
> say the script is myscr.pl, the lib file is mylib.pm, the template file is
> myttt.tmpl.
>
> so in myscr.pl:
>
> use lib './lib';
> use mylib;
> require 'template/myttt.tmpl';
>
>
> in mylib.pm:
>
> require '../template/myttt.tmpl';
>
>
> When I execute "perl mysrc.pl", it can't run, saying the routines in
> myttt.tmpl can't be found.

Hi, Jeff.  This list is for mod_perl development, not CGI.  That said,
you'll need to read the documentation for the template engine (which
one are you using?) that you are using.  I doubt that you want to
simply "require" them in your script like this.

Sean

Reply via email to