Dave Rolsky > Text-TOC-0.10 > Text::TOC::Filter::Anon

Download:
Text-TOC-0.10.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.10   Source  

NAME ^

Text::TOC::Filter::Anon - Node filter wrapper for subroutine references

VERSION ^

version 0.10

SYNOPSIS ^

  my $filter = Text::TOC::Filter::Anon->new( code => sub {...} );

  if ( $filter->node_is_interesting($node) ) {...}

DESCRIPTION ^

This class wraps a subroutine reference with the Filter role API.

METHODS ^

This class provides the following methods:

Text::TOC::Filter::Anon->new()

This method accepts one parameter, code, which must be a subroutine reference. That subroutine will be called with a single argument, some sort of node object. The specific type of object will depend on the type of source document being examined.

ROLES ^

This class implements the Text::TOC::Role::Filter role.

AUTHOR ^

Dave Rolsky <autarch@urth.org>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2012 by Dave Rolsky.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: