The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Iterator Module

A set of iterator functions for traversing the various trees and indexes. Each iterator expects closures that operate on the elements in the iterated data structure.

Generic

        Params: $node, &$loopsub, &$skipsub, &$applysub, &$recursesub

Iterate over $node\'s children. For each iteration:

If loopsub( $node, $kid ) returns false, the loop is terminated. If skipsub( $node, $kid ) returns true, the element is skipped.

Applysub( $node, $kid ) is called If recursesub( $node, $kid ) returns true, the function recurses into the current node.

Tree

        Params: $root, $recurse?, $commonsub, $compoundsub, $membersub,
                $skipsub

Traverse the ast tree starting at $root, skipping if skipsub returns true.

Applying $commonsub( $node, $kid), then $compoundsub( $node, $kid ) or $membersub( $node, $kid ) depending on the Compound flag of the node.

LocalCompounds

Apply $compoundsub( $node ) to all locally defined compound nodes (ie nodes that are not external to the library being processed).

Hierarchy

        Params: $node, $levelDownSub, $printSub, $levelUpSub

This allows easy hierarchy traversal and printing.

Traverses the inheritance hierarchy starting at $node, calling printsub for each node. When recursing downward into the tree, $levelDownSub($node) is called, the recursion takes place, and $levelUpSub is called when the recursion call is completed.

        Call $printsub for each *direct* ancestor of $node.
        Only multiple inheritance can lead to $printsub being called more than once.

DocTree