Jeff,

I'm running into issues with mod_perl2 that sound like they may be
related.  Are you, in fact, running this script under mod_perl?  Doesthe
myttt.tmpl file that you refer to contain Perl code that is to be
eval'ed in your myscr.pl?

Just yesterday I ran into a problem in which using do( $file ) or eval(
$file ) both had problems in that they did not successfully execute the
code in $file.

Does that sound like your problem?

Folks, is there some kind of setting for mod_perl2 that affects this, or
a different way to accomplish this?

Eric

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On 
> Behalf Of Sean Davis
> Sent: Friday, August 29, 2008 10:05 AM
> To: Jeff Pang
> Cc: modperl perl apache org
> Subject: Re: a require problem
> 
> 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
> 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - -

This message is intended only for the personal and confidential use of the 
designated recipient(s) named above.  If you are not the intended recipient of 
this message you are hereby notified that any review, dissemination, 
distribution or copying of this message is strictly prohibited.  This 
communication is for information purposes only and should not be regarded as an 
offer to sell or as a solicitation of an offer to buy any financial product, an 
official confirmation of any transaction, or as an official statement of Lehman 
Brothers.  Email transmission cannot be guaranteed to be secure or error-free.  
Therefore, we do not represent that this information is complete or accurate 
and it should not be relied upon as such.  All information is subject to change 
without notice.

--------
IRS Circular 230 Disclosure:
Please be advised that any discussion of U.S. tax matters contained within this 
communication (including any attachments) is not intended or written to be used 
and cannot be used for the purpose of (i) avoiding U.S. tax related penalties 
or (ii) promoting, marketing or recommending to another party any transaction 
or matter addressed herein.

Reply via email to