```{index} single: main_root; B function ``` ```{index} single: B::main_root; Perl function ``` # main_root Return a `B::OP` for the root of the program's main optree. ## Synopsis ```perl my $root = B::main_root; $root->name; # typically "leave" ``` The root op is the top of the tree that `B::Deparse` and friends walk. Paired with `B::main_start`, which gives the entry point in execution order.