On Sat, Jul 29, 2000 at 03:26:02PM -0700, Chetan Patil wrote:
> Hello,
> We have a large code base printing header, body and footers to the STDOUT
> from the cgi scripts. Since all these are print statements, we have to go to
> extreme measures to make sure we donot print the content more than once.
> To clean things up (or at least start at it), we want to be able to trap the
> output of print to a local buffer and then selectively flush or junk based
> on the logic (for eg, if we decide to redirect at the end of the script,
> then we want to junk the buffer).
> I am looking for a quick solution which would allow me to override the
> CORE::print function and simply write to a buffer (a perl scalar). Once I am
> done with the processing, I can write out the buffer or junk it.
> Is it possible to do this? What should I be careful of?
>
Perhaps Apache::Filter do the job ?
--
Y a n n K e r h e r v é | [EMAIL PROTECTED]
Developer EdenJob, Webmaster Esiea-Ouest | ICQ: 43893215
Perl Mongueur, Linux, Linux-Alpha, ... | TEL: 0146217695