You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Kirk <ki...@icapsolutions.com> on 2008/04/14 19:29:10 UTC

Template::Toolkit and mod_perl2?

I'm trying to do some basic conversions to an old site that uses TT, and
attempting to get it running under mod_perl2.  at the moment I'm getting no
errors but the web pages aren't displaying.  Before I get into too much
detail, I'm just wondering if TT work under mod_perl2.  Anyone have any
experience with it?  Got it running perhaps?

Thx,
Kirk




RE: Template::Toolkit and mod_perl2?

Posted by Kirk <ki...@icapsolutions.com>.
[error] Can't locate object method "preload" via package "Template::Config"
at /usr/lib/perl5/site_perl/5.8.8/Templat
e.pm line 44.

I'm using the test script right out of the TT:
http://template-toolkit.org/docs/tutorial/Web.html#section_Dynamic_Content_G
eneration_Via_CGI_Script


with this in my conf file:
  Alias /soap-cgi/ "/var/www/domain/soap-cgi/"
  <Location /soap-cgi>
    SetHandler perl-script
    PerlResponseHandler ModPerl::Registry
    Options +ExecCGI
  </Location>

>From my CPAN install of TT:
>Template is up to date (2.19).
>Template::Config is up to date (2.74).

And I'n running Fedora Core6, from apache log file:
[notice] Apache/2.2.6 (Unix) DAV/2 PHP/5.1.6 mod_python/3.2.8 Python/2.4.3
mod_ssl/2.2.3 OpenSSL/0.9.8b mod_apreq2-20
051231/2.6.0 mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal
operations


Kirk

> -----Original Message-----
> From: Tyler Gee [mailto:geekout@gmail.com]
> Sent: Monday, April 14, 2008 10:33 AM
> To: kirk@icapsolutions.com
> Cc: modperl@perl.apache.org
> Subject: Re: Template::Toolkit and mod_perl2?
> 
> On Mon, Apr 14, 2008 at 7:29 AM, Kirk <ki...@icapsolutions.com> wrote:
> > I'm trying to do some basic conversions to an old site that uses TT, and
> >  attempting to get it running under mod_perl2.  at the moment I'm
> getting no
> >  errors but the web pages aren't displaying.  Before I get into too much
> >  detail, I'm just wondering if TT work under mod_perl2.  Anyone have any
> >  experience with it?  Got it running perhaps?
> 
> Works fine.  Check your return types and your headers.
> 
> Post a simple example that's not working if you can.
> 
> >
> >  Thx,
> >  Kirk
> >
> >
> >
> >
> 
> 
> 
> --
> ~Tyler




Re: Template::Toolkit and mod_perl2?

Posted by Tyler Gee <ge...@gmail.com>.
On Mon, Apr 14, 2008 at 7:29 AM, Kirk <ki...@icapsolutions.com> wrote:
> I'm trying to do some basic conversions to an old site that uses TT, and
>  attempting to get it running under mod_perl2.  at the moment I'm getting no
>  errors but the web pages aren't displaying.  Before I get into too much
>  detail, I'm just wondering if TT work under mod_perl2.  Anyone have any
>  experience with it?  Got it running perhaps?

Works fine.  Check your return types and your headers.

Post a simple example that's not working if you can.

>
>  Thx,
>  Kirk
>
>
>
>



-- 
~Tyler

Re: Template::Toolkit and mod_perl2?

Posted by ad...@utoronto.ca.
This is a guess, but are you running under SetHandler modperl, and  
then trying to print $your_page.  If that's the case, either use  
$r->print(), or change to SetHandler perl-script.

Adam

Quoting Kirk <ki...@icapsolutions.com>:

> I'm trying to do some basic conversions to an old site that uses TT, and
> attempting to get it running under mod_perl2.  at the moment I'm getting no
> errors but the web pages aren't displaying.  Before I get into too much
> detail, I'm just wondering if TT work under mod_perl2.  Anyone have any
> experience with it?  Got it running perhaps?
>
> Thx,
> Kirk