use B; my $subref = sub { # some subroutine } my $b = B::svref_2object( $subref ); my $op = $b->START; do { print B::class($op) . " : " . $op->name . " (" . $op->desc . ")\n"; } while $op = $op->next and not $op->isa("B::NULL");