1PPIx::EditorTools::FindUUsnemratCcohnetdrBirbauctee(d3P)PPeIrxl::DEodciutmoernTtoaotliso:n:FindUnmatchedBrace(3)
2
3
4
6 PPIx::EditorTools::FindUnmatchedBrace - PPI-based
7 unmatched-brace-finder
8
10 version 0.21
11
13 my $brace = PPIx::EditorTools::FindUnmatchedBrace->new->find(
14 code => "package TestPackage;\nsub x { 1;\n"
15 );
16 my $location = $brace->element->location;
17
19 Finds the location of unmatched braces in a "PPI::Document".
20
22 new()
23 Constructor. Generally shouldn't be called with any arguments.
24
25 find( ppi => PPI::Document $ppi )
26 find( code => Str $code )
27 Accepts either a "PPI::Document" to process or a string containing
28 the code (which will be converted into a "PPI::Document") to
29 process. Finds the location of unmatched braces. Returns a
30 "PPIx::EditorTools::ReturnObject" with the unmatched brace (a
31 "PPI::Structure::Block") available via the "element" accessor. If
32 there is no unmatched brace, returns undef.
33
35 This class inherits from "PPIx::EditorTools". Also see
36 App::EditorTools, Padre, and PPI.
37
39 • Steffen Mueller "smueller@cpan.org"
40
41 • Mark Grimes "mgrimes@cpan.org"
42
43 • Ahmad M. Zawawi <ahmad.zawawi@gmail.com>
44
45 • Gabor Szabo <gabor@szabgab.com>
46
47 • Yanick Champoux <yanick@cpan.org>
48
50 This software is copyright (c) 2017, 2014, 2012 by The Padre
51 development team as listed in Padre.pm..
52
53 This is free software; you can redistribute it and/or modify it under
54 the same terms as the Perl 5 programming language system itself.
55
56
57
58perl v5.34.0 2022-P0P1I-x2:1:EditorTools::FindUnmatchedBrace(3)