CGI-MxScreen
view release on metacpan or search on metacpan
MxScreen/Serializer/Storable.pm view on Meta::CPAN
The creation routine C<make()> takes the following optional arguments:
=over 4
=item C<-compress> => I<flag>
Whether to compress the serialized form before returning it.
Data will be uncompressed on-the-fly by the C<deserialize> routine.
It is I<false> by default.
This makes compression transparent once configured.
=item C<-shared> => I<flag>
Whether serialized data are expected to be shared across different
architectures. When I<true>, C<Storable> will use its portable format
to perform the serialization. Otherwise, data can normally be recovered
only on a compatible architecture.
It is I<false> by default.
MxScreen/Tie/Stdout.pm view on Meta::CPAN
#
sub WRITE {
DFEATURE my $f_;
my $self = shift;
my ($buf, $len, $offset) = @_;
return DVOID unless $len;
#
# If we see "Content-Type:", or something that looks like a header,
# then someone is trying to reply before we were untied explicitely.
# Let's become transparent by untie-ing ourselves.
#
# For this to work, we assume header names will be emitted in one single
# "print" statement, at least.
#
if ($buf =~ /^[\w-]+:/m) {
logtrc 'info', "header emitted, STDOUT becoming transparent";
untie *main::STDOUT;
$self->CLOSE;
syswrite(STDOUT, $buf, $len, $offset);
return DVOID;
}
#
# Determine caller
#
MxScreen/Tie/Stdout.pm view on Meta::CPAN
# Not meant to be used directly
=head1 DESCRIPTION
This class is used by C<CGI::MxScreen> to discard any STDOUT output made
until the C<display()> routine is called. All discarded output is logged,
with the origin of the call, identifying the culprit.
Upon an unexpected reception of something that looks like an HTTP header,
it automatically becomes transparent and removes itself.
=head1 AUTHOR
Raphael Manfredi F<E<lt>Raphael_Manfredi@pobox.comE<gt>>
=head1 SEE ALSO
CGI::MxScreen(3).
( run in 0.482 second using v1.01-cache-2.11-cpan-a1d94b6210f )