| PPIx-EditorTools documentation | view source | Contained in the PPIx-EditorTools distribution. |
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.
Constructor. Generally shouldn't be called with any arguments.
Accepts either a 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 App::EditorTools, Padre, and PPI.
| PPIx-EditorTools documentation | view source | Contained in the PPIx-EditorTools distribution. |