perl-asp mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arnon Weinberg <>
Subject Include() vs. TrapInclude()
Date Mon, 30 Apr 2012 16:29:37 GMT

Just thought I'd post this for anyone else that might run into a similar 

The documentation seems to suggest that Include() and TrapInclude() are 
interchangeable, apart from the buffering that happens.  That is:
should be equivalent to:
with respect to output.

However, TrapInclude() creates a local output buffer, whereas Include() 
does not, so certain methods behave differently if they run inside an 
Include() file vs. a TrapInclude() file.  For example, 
$Response->Clear(), $Response->End(), and $Response->Flush() produce 
different results.  Their behaviour is a natural consequence of local 
output buffering, so just something to be aware of.

Also, when Buffering is turned on, the behaviour of $Response->End() is 
not as expected given a local output buffer, as it ends the program, but 
does not flush the caller's buffer, so this may be a minor bug.

Arnon Weinberg

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

View raw message