Dave Rolsky

NAME

Text::TOC::Node::HTML - Represents a node in an HTML document

VERSION

version 0.10

DESCRIPTION

This class represents a node from an HTML document which will be included in the table of contents.

METHODS

This class implements the following methods:

Text::TOC::Node::HTML->new( ... )

The constructor accepts the following arguments:

  • type

    This is expected to be an HTML tag name, like "h2" or "img".

  • anchor_name

    The name of the anchor associated with this node.

  • source_file

    A Path::Class::File object representing the source file for the node.

  • contents

    An HTML::DOM::Node object representing the node and its contents.

$node->type()

$node->anchor_name()

$node->source_file()

$node->contents()

Returns the value as passed to the constructor.

ROLES

This class does the Text::TOC::Role::Node 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.