perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Kim <>
Subject saving snapshot of the page
Date Fri, 01 Apr 2005 20:27:11 GMT

I asked a similar question before (teeing the output), but had a
different needs and would like to ask again.

I'd like to save the complete page by making a very long string. That is,
the complete (embperl processed) page will be stored into one field in the

I'd like to do it at the same time when I send the page to the browser.
This is needed only on a few pages.

If there's a way to change the output handle inside the page, I'd like to
do something like
  ... Process all ...
  buffer the output in a string variable named $page. 
<!-- save to database --> 
  insert into table values (id, '$page')
<!-- send to browser -->

I know I can do it the cgi way or equivalent (like $str .=
qq[<table>...];) but the resulting code looked very tangled and I feel
there should be a simpler way.

I checked Execute method (since it has the "output" option) but from the
documentation, I can't figure out how to get the output buffer's contents
before it's output to the output file.
    inputfile => "degree_plan_printable.epl",
    outputfile => "degree_plan_printable4.epl"

What I need is something similar to php's ob_start, ob_get_contents, and

I'd appreciate any idea.

PS. I could possibly use but it's giving me this error. Also,
it's not my preferred way.
========================================================== ==============

$ degree_plan_printable.epl <SNIP>perl: fatal: relocation error: file /usr/<SNIP>/
symbol ap_strchr: referenced symbol not found. Killed


Ben Kim
Database Developer/Systems Administrator
434E Harrington Tower / College of Education 
Texas A&M University

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message