libxml-handler-printevents-perl-0.01.orig/0042775000175000001500000000000007344737216016416 5ustar ardolibxml-handler-printevents-perl-0.01.orig/MANIFEST0100664000175000001500000000007307344736601017537 0ustar ardoChanges Makefile.PL MANIFEST PrintEvents.pm README test.pl libxml-handler-printevents-perl-0.01.orig/Changes0100664000175000001500000000027107344736601017701 0ustar ardoRevision history for Perl extension XML::Handler::PrintEvents. 0.01 Sun Aug 26 11:07:45 2001 - original version; created by h2xs 1.21 with options -X -n XML::Handler::PrintEvents libxml-handler-printevents-perl-0.01.orig/Makefile.PL0100664000175000001500000000045607344736601020365 0ustar ardouse ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. WriteMakefile( 'NAME' => 'XML::Handler::PrintEvents', 'VERSION_FROM' => 'PrintEvents.pm', # finds $VERSION 'PREREQ_PM' => {XML::Filter::SAXT => 0}, ); libxml-handler-printevents-perl-0.01.orig/PrintEvents.pm0100664000175000001500000000271307344736601021230 0ustar ardo# # This PerlSAX handler prints out all the PerlSAX events/callbacks # it receives. Very useful when debugging. # package XML::Handler::PrintEvents; use strict; use XML::Filter::SAXT; use vars qw($VERSION); $VERSION = 0.01; my @EXTRA_HANDLERS = ( 'ignorable_whitespace' ); sub new { my ($class, %options) = @_; bless \%options, $class; } sub print_event { my ($self, $event_name, $event) = @_; printf "%-22s ", $event_name; if (defined $event) { print join (", ", map { "$_ => [" . (defined $event->{$_} ? $event->{$_} : "(undef)") . "]" } keys %$event); } print "\n"; } # # This generates the PerlSAX handler methods for PrintEvents. # They basically forward the event to print_event() while adding the callback # (event) name. # for my $cb (@EXTRA_HANDLERS, map { @{$_} } values %XML::Filter::SAXT::SAX_HANDLERS) { eval "sub $cb { shift->print_event ('$cb', \@_) }"; } 1; # package return code __END__ =head1 NAME XML::Handler::PrintEvents - Prints PerlSAX events (for debugging) =head1 SYNOPSIS use XML::Handler::PrintEvents; my $pr = new XML::Handler::PrintEvents; =head1 DESCRIPTION This PerlSAX handler prints the PerlSAX events it receives to STDOUT. It can be useful when debugging PerlSAX filters. It supports all PerlSAX handler including ignorable_whitespace. =head1 AUTHOR Enno Derksen is the original author. Send bug reports, hints, tips, suggestions to T.J. Mather at >. =cut libxml-handler-printevents-perl-0.01.orig/README0100664000175000001500000000110707344736601017265 0ustar ardoXML::Handler::PrintEvents version 0.01 ====================================== DESCRIPTION This PerlSAX handler prints the PerlSAX events it receives to STDOUT. It can be useful when debugging PerlSAX filters. It supports all PerlSAX handler including ignorable_whitespace. INSTALLATION To install this module type the following: perl Makefile.PL make make test make install COPYRIGHT AND LICENCE Copyright (c) 1999,2000 Enno Derksen All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. libxml-handler-printevents-perl-0.01.orig/test.pl0100664000175000001500000000077107344736601017727 0ustar ardo# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl test.pl' ######################### # change 'tests => 1' to 'tests => last_test_to_print'; use Test; BEGIN { plan tests => 1 }; use XML::Handler::PrintEvents; ok(1); # If we made it this far, we're ok. ######################### # Insert your test code below, the Test module is use()ed here so read # its man page ( perldoc Test ) for help writing this test script.