|
NAMEXML::Filter::Tee - Send SAX events to multiple processor, with switchingVERSIONversion 0.46SYNOPSISmy $t = XML::Filter::Tee->new( { Handler => $h0 }, { Handler => $h1 }, { Handler => $h2 }, ... ); ## Altering the handlers list: $t->set_handlers( $h0, $h1, $h2, $h3 ); ## Controlling flow to a handler by number and by reference: $t->disable_handler( 0 ); $t->enable_handler( 0 ); $t->disable_handler( $h0 ); $t->enable_handler( $h0 ); ## Use in a SAX machine (though see L<XML::SAX::Pipeline> and ## L<XML::SAX::Tap> for a more convenient way to build a machine ## like this): my $m = Machine( [ Intake => "XML::Filter::Tee" => qw( A B ) ], [ A => ">>log.xml" ], [ B => \*OUTPUT ], ); DESCRIPTIONXML::Filter::Tee is a SAX filter that passes each event it receives on to a list of downstream handlers.It's like XML::Filter::SAXT in that the events are not buffered; each event is sent first to the tap, and then to the branch (this is different from XML::SAX::Dispatcher, which buffers the events). Unlike XML::Filter::SAXT, it allows it's list of handlers to be reconfigured (via "set_handlers") and it allows control over which handlers are allowed to receive events. These features are designed to make XML::Filter::Tee instances more useful with SAX machines, but they to add some overhead relative to XML::Filter::SAXT. The events are not copied, since they may be data structures that are difficult or impossibly to copy properly, like parts of a C-based DOM implementation. This means that the handlers must not alter the events or later handlers will see the alterations. NAMEXML::Filter::Tee - Send SAX events to multiple processor, with switchingMETHODS
AUTHORBarrie Slaymaker <barries@slaysys.com> COPYRIGHTCopyright 2002, Barrie Slaymaker, All Rights Reserved You may use this module under the terms of the Artistic, GNU Public, or BSD licenses, as you choose. AUTHORS
COPYRIGHT AND LICENSEThis software is copyright (c) 2013 by Barry Slaymaker.This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Visit the GSP FreeBSD Man Page Interface. |