Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: HTML::Template::Pro - Issue with template files larger than 8K

by Uniden (Initiate)
on Jul 08, 2014 at 19:41 UTC ( [id://1092781]=note: print w/replies, xml ) Need Help??


in reply to Re: HTML::Template::Pro - Issue with template files larger than 8K
in thread HTML::Template::Pro - Issue with template files larger than 8K

Yep, thanks, I totally forgot to run from command line. Well, from command line it works just fine.. I upped the size of the template file to about 5MB and no issues with command line. Is that weird or what?!? So I suspect that the issue is rather at the Apache level. I guess I will just reset my httpd.conf and start from there.

  • Comment on Re^2: HTML::Template::Pro - Issue with template files larger than 8K

Replies are listed 'Best First'.
Re^3: HTML::Template::Pro - Issue with template files larger than 8K
by Uniden (Initiate) on Jul 11, 2014 at 16:46 UTC

    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/perl
    use strict;
    $|=1;
    use HTML::Template::Pro;
    my $tmpl = HTML::Template::Pro -> new(filename => 'test.tmpl');
    print "Content-Type: text/html\n\n";
    $tmpl -> output();

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1092781]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-24 17:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found