Sjors Gielen > POE-Filter-ErrorProof-1.0 > POE::Filter::ErrorProof

Download:
POE-Filter-ErrorProof-1.0.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.01   Source  

NAME ^

POE::Filter::ErrorProof - POE::Filter wrapper around 'dangerous' Filters

SYNOPSIS ^

  use POE::Filter::ErrorProof;
  my $wheel = POE::Wheel::ReadWrite->new(
        Filter  => POE::Filter::ErrorProof->new(POE::Filter::Something->new()),
  );

DESCRIPTION ^

This module is a wrapper around other POE::Filters. I made this module when I noticed POE::Filter::XML would die() when non-XML input was given to it. The author of the module wasn't there, so I had to bring up a solution. You can use this module if you use a POE::Filter that might die if something bad happens. This Filter does nothing more than giving through the input in eval blocks.

THE NEW METHOD ^

   POE::Filter::ErrorProof->new(); # Create a POE::Filter::ErrorProof with a POE::Filter::Stream in it
   POE::Filter::ErrorProof->new(POE::Filter::XML->new()); # Do the same but with a POE::Filter::XML
   POE::Filter::ErrorProof->new(POE::Filter::XML->new(), 1); # Do the same, but output errors on STDERR
   POE::Filter::ErrorProof->new(POE::Filter::XML->new(), $socket); # Do the same, but output errors on this socket
   $wheel = POE::Wheel::ReadWrite->new( .... );
   POE::Filter::ErrorProof->new(POE::Filter::XML->new(), $wheel); # Output errors to this wheel

AUTHOR ^

Sjors Gielen, <sjorsgielen@gmail.com>

syntax highlighting: