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

NAME

B::Tools - Simple B operating library

SYNOPSIS

    use B::Tools;

    op_walk {
        say $_->name;
    } $root;

    my @entersubs = op_grep { $_->name eq 'entersub' } $root;

DESCRIPTION

B::Tools is simple B operating library.

FUNCTIONS

op_walk(&$)

Walk every op from root node.

First argument is the callback function for walking. Second argument is the root op to walking.

Return value: Useless.

op_grep(&$)

Grep the op from op tree.

First argument is the callback function for grepping. Second argument is the root op to grepping.

Return value: Result of grep.

my @descendants = op_descendants($)

Get the descendants from $op.

Return value: @descendants

LICENSE

Copyright (C) tokuhirom.

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

AUTHOR

tokuhirom <tokuhirom@gmail.com>

SEE ALSO

B is a library for manage B things.

B::Generate to generate OP tree in pure perl code.

B::Utils provides features like this. But this module provides more simple features.