NAME

B::OptreeShortestPath - The great new B::OptreeShortestPath!

VERSION

Version 0.02

DESCRIPTION

This module adds the methods ->shortest_path( $op ) and ->all_paths() to all B::OP objects in an optree.

SYNOPSIS

    use B qw( main_root main_start );
    use B::OptreeShortestPath;
    
    for ( main_start()->shortest_path( main_root() ) ) {
        print "$_\n";
    }

METHODS

$op->shortest_path( $other_op )

Returns a list of the shortest paths from $op to $other_op. Each path is a string approximating a bunch of chained method calls.

 "->next->sibling->next",
 "->sibling->sibling->next"
$op->all_paths()

Returns a list of paths from this node to all other nodes.

AUTHOR

Joshua ben Jore, <twists@gmail.com>

BUGS

Please report any bugs or feature requests to bug-b-optreeshortestpath@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=B-OptreeShortestPath. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2005 Joshua ben Jore, all rights reserved.

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