View on
MetaCPAN
Aaron Straup Cope > XML-Filter-XML_Directory_Pruner-1.3 > XML::Filter::XML_Directory_Pruner

Download:
XML-Filter-XML_Directory_Pruner-1.3.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.3   Source  

NAME ^

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

SYNOPSIS ^

 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]);

DESCRIPTION ^

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

PACKAGE METHODS ^

__PACKAGE__->mtype($file)

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

OBJECT METHODS ^

$pkg = __PACKAGE__->new()

Inherits from XML::SAX::Base

$pkg->include(%args)

Include *only* that files that match either the starting or ending pattern.

Valid arguments are

$pkg->exclude(%args)

Exclude files with a particular name or pattern from being included in the directory listing.

Valid arguments are

$pkg->ima($what)

$pkg->current_level()

Read-only.

$pkg->skip_level()

$pkg->debug($int)

Read/write debugging flags.

By default, the package watches and performs actions if the debug level is greater than or equal to :

PRIVATE METHODS ^

$pkg->start_element($data)

$pkg->end_element($data)

$pkg->_on_exit_end_element()

$pkg->characters($data)

$pkg->compare(\%data)

$pkg->_compare($data)

VERSION ^

1.3

DATE ^

July 20, 2002

AUTHOR ^

Aaron Straup Cope

TO DO ^

SEE ALSO ^

XML::Directory::SAX

XML::SAX::Base

MIME::Types

LICENSE ^

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.

syntax highlighting: