HTML::Widgets::NavMenu::Iterator::Base - base class for the iterator.


NAME

HTML::Widgets::NavMenu::Iterator::Base - base class for the iterator.


SYNOPSIS

For internal use only.


METHODS =cut

sub _init { my $self = shift;

    $self->SUPER::_init(@_);
    my %args = (@_);
    $self->nav_menu($args{'nav_menu'}) or
        die "nav_menu not specified!";
    $self->{'html'} = [];
    return 0;
    }

sub _add_tags { my $self = shift; push (@{$self->{'html'}}, @_); }

sub _is_root { my $self = shift;

    return ($self->stack->len() == 1);
    }

sub _is_top_separator { my $self = shift;

    return $self->top->_node->separator;
    }

$self->get_initial_node()

Gets the initial node.

$self->get_node_subs({ args => $node})

Gets the subs of the node.

$self->get_new_accum_state( item => $item, node => $node )

Gets the new accumulated state.

my $array_ref = $self->get_results()

Returns an array reference with the resultant HTML.


COPYRIGHT & LICENSE

Copyright 2006 Shlomi Fish, all rights reserved.

This program is released under the following license: MIT X11.