
XML::Filter::XML_Directory_Pruner - SAX2 filter for restricting the output of the XML::Directory::SAX

use XML::SAX::Writer;
use XML::Directory::SAX;
use XML::Filter::XML_Directory_Pruner;
my $output = "";
my $writer = XML::SAX::Writer->new(Output=>\$output);
my $pruner = XML::Filter::XML_Directory_Pruner->new(Handler=>$writer);
$pruner->exclude(matching=>["(.*)\\.ph\$"]);
$pruner->include(ending=>[".pm"]);
my $directory = XML::Directory::SAX->new(Handler => $pruner,
detail => 2,
depth => 1);
$directory->parse_dir($INC[0]);

XML::Filter::XML_Directory_Pruner is a SAX2 filter for restricting the output of the XML::Directory::SAX handler.

Return the media type, as defined by the MIME::Types package, associated with $file.

Inherits from XML::SAX::Base
Include *only* that files that match either the starting or ending pattern.
Valid arguments are
Array ref.
Array ref. One or more regular expressions.
note that when this expression is compared, leaning toothpicks (e.g. : /$pattern/) are provided for you.
In earlier releases, only a string was expected. Newer releases are backward compatible.
Array ref.
Array ref.
Exclude files with a particular name or pattern from being included in the directory listing.
Valid arguments are
Array ref.
Array ref. One or more regular expressions.
note that when this expression is compared, leaning toothpicks (e.g. : /$pattern/) are provided for you.
In earlier releases, only a string was expected. Newer releases are backward compatible.
Array ref.
Array ref.
Boolean. Default is false.
files
Boolean. Default is false.
Read-only.
Read/write debugging flags.
By default, the package watches and performs actions if the debug level is greater than or equal to :
Nothing.
Prints to STDERR the type, name and level of the current element.
Prints to STDERR the results of checks in $pkg->_compare()


1.3

July 20, 2002

Aaron Straup Cope



Copyright (c) 2002, Aaron Straup Cope. All Rights Reserved.
This is free software, you may use it and distribute it under the same terms as Perl itself.