NAME
Text::TOC::Role::OutputHandler - A role for output handlers
VERSION
version 0.10
DESCRIPTION
This role defines the API for output handlers.
REQUIRED METHODS
This role requires one method:
$handler->process_node_list($nodes)
This method takes an array reference of objects which implement the Text::TOC::Role::Node API and does something with them. Typically, that "something" will be to construct a representation of the table of contents, and to insert anchors for the nodes into the source document.
Note that this latter feature requires that the nodes reference the source document somehow. For example, with an HTML document, the implementation uses HTML::DOM, which means that nodes are able to access their entire containing document.
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.