On Sun, 28 Jul 2002, allan juul wrote:

> hello, this is my first post to this list.

Hi, I noticed it'd been a few days and no-one had replied to you.
 
> i wish to use Template Toolkit version 2.06 on a shared webserver running 
> mod_perl. problem is the ISP is not very villing to install it so they 
> recomended me to  copy the module and then
>   
>   use lib "path/to/TT";

What's in INC at this point?  Try:

 use Data::Dumper;
 BEGIN { print STDERR '@INC is '.Dumper(\@INC) }

>   use Template qw ( :template);

> works fine _almost_ all the time. this is what i do on my development system:
> 
> 1. restart apache

Are you stopping and starting apache?  Don't do a "apachectl restart" as 
that can get you into all kinds of trouble.

> 2. hit the page the very first time
> 3. look in error_log: 
>   ... failed to load Template/Iterator.pm: Can't locate Template/Iterator.pm in 
> @INC etc ........at path/to/TT/Template/Config.pm line 75
> 
> [it's true that it is not in @INC, but that's just the point, since 
> im "dynamically" is use(ing) lib "path/to/TT";]

@INC should be modified by the 'use lib' so you should see any changes 
you made in there in there.

> 4. hit the page a second time
> 5. no problems whatsoever

This sounds like one of those problems you get where your request is being 
served by a different httpd.  If you're not restarting properly (with a 
stop and a start) then it's possible you're seeing a old configured 
version of your script, INC, etc.

On your development server stop all your apaches (kill em dead) 
then startup apache with the '-X' option (see 
mod_perl guide) to launch only one server rather than the normal number 
and see what happens then.

> if i install Template Toolkit properly [so it will be in @INC] i get no 
> problems, but that is not a prefered option currently.

If you can't work out what the problem is then I suggest you try setting 
up @INC other ways.  You can do this by:

 a) Exporting the environmental variable PERL5LIB with new dirs before
    you start apache

 b) using a PerlRequire script in your httpd.conf

Sorry I can't be more helpful.

Mark

-- 
s''  Mark Fowler                                     London.pm   Bath.pm
     http://www.twoshortplanks.com/              [EMAIL PROTECTED]
';use Term'Cap;$t=Tgetent Term'Cap{};print$t->Tputs(cl);for$w(split/  +/
){for(0..30){$|=print$t->Tgoto(cm,$_,$y)." $w";select$k,$k,$k,.03}$y+=2}



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

Reply via email to