PPIx::EditorTools::FindUnmatchedBrace - PPI-based unmatched-brace-finder |
PPIx::EditorTools::FindUnmatchedBrace - PPI-based unmatched-brace-finder
my $brace = PPIx::EditorTools::FindUnmatchedBrace->new->find( code => "package TestPackage;\nsub x { 1;\n" ); my $location = $brace->element->location;
Finds the location of unmatched braces in a PPI::Document
.
new()
PPI::Document
to process or a string containing
the code (which will be converted into a PPI::Document
) to process.
Finds the location of unmatched braces. Returns a
PPIx::EditorTools::ReturnObject
with the unmatched brace (a
PPI::Structure::Block
) available via the element
accessor.
If there is no unmatched brace, returns undef.
This class inherits from PPIx::EditorTools
.
Also see the App::EditorTools manpage, Padre, and PPI.
PPIx::EditorTools::FindUnmatchedBrace - PPI-based unmatched-brace-finder |