There's more than one way to do things | |
PerlMonks |
Re^3: HTML::Template::Pro - Issue with template files larger than 8Kby Uniden (Initiate) |
on Jul 11, 2014 at 16:46 UTC ( [id://1093251]=note: print w/replies, xml ) | Need Help?? |
Oki Doki! The culprit is the output buffering. When executing the script via command line, the header does display exactly after 8192 bytes, which when run through Apache produces an error. Output buffering can be disabled in Perl, so I added the line "$|=1;" to my script and now it works. #!/usr/bin/perluse strict; $|=1; use HTML::Template::Pro; my $tmpl = HTML::Template::Pro -> new(filename => 'test.tmpl'); print "Content-Type: text/html\n\n"; $tmpl -> output();
In Section
Seekers of Perl Wisdom
|
|