in reply to Re^3: Thread::Pool and Template Toolkit
in thread Thread::Pool and Template Toolkit
Ok here a code snippet to demonstrate the issue. If I uncomment Thread::Pool I don't see anything in the web browser, but the logs don't show any error. As soon as I comment it out I see the expected template display:
CGI code
template.html:
CGI code
#!/usr/bin/perl -w use strict; use CGI; #use Thread::Pool; use Template; my $q = new CGI; print "Content-type: text/html\n\n"; my $file = 'template.html'; my $vars = { message => "Hello World\n" }; my $template = Template->new({ INCLUDE_PATH => $ENV{DOCUMENT_ROOT} . '/t +emplates' }); $template->process($file, $vars) || die "Template process failed: ", $template->error(), "\n";
template.html:
<html lang="en"> <head> <title>Template Thread Test</title> </head> <body> This is a test, [% message %] </body> </html>
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Thread::Pool and Template Toolkit
by Joost (Canon) on Aug 07, 2004 at 20:25 UTC | |
Re^5: Thread::Pool and Template Toolkit
by BrowserUk (Patriarch) on Aug 07, 2004 at 19:37 UTC | |
by perldragon80 (Sexton) on Aug 07, 2004 at 19:59 UTC | |
by BrowserUk (Patriarch) on Aug 08, 2004 at 06:11 UTC | |
by perldragon80 (Sexton) on Aug 09, 2004 at 17:03 UTC | |
by BrowserUk (Patriarch) on Aug 09, 2004 at 17:38 UTC | |
|
In Section
Seekers of Perl Wisdom