| 1 | package PPI::Statement::UnmatchedBrace; | ||
| 2 | |||
| 3 | =pod | ||
| 4 | |||
| 5 | =head1 NAME | ||
| 6 | |||
| 7 | PPI::Statement::UnmatchedBrace - Isolated unmatched brace | ||
| 8 | |||
| 9 | =head1 SYNOPSIS | ||
| 10 | |||
| 11 | sub foo { | ||
| 12 | 1; | ||
| 13 | } | ||
| 14 | |||
| 15 | } # <--- This is an unmatched brace | ||
| 16 | |||
| 17 | =head1 INHERITANCE | ||
| 18 | |||
| 19 | PPI::Statement::UnmatchedBrace | ||
| 20 | isa PPI::Statement | ||
| 21 | isa PPI::Node | ||
| 22 | isa PPI::Element | ||
| 23 | |||
| 24 | =head1 DESCRIPTION | ||
| 25 | |||
| 26 | The C<PPI::Statement::UnmatchedBrace> class is a miscellaneous utility | ||
| 27 | class. Objects of this type should be rare, or not exist at all in normal | ||
| 28 | valid L<PPI::Document> objects. | ||
| 29 | |||
| 30 | It can be either a round ')', square ']' or curly '}' brace, this class | ||
| 31 | does not distinguish. Objects of this type are only allocated at a | ||
| 32 | structural level, not a lexical level (as they are lexically invalid | ||
| 33 | anyway). | ||
| 34 | |||
| 35 | The presence of a C<PPI::Statement::UnmatchedBrace> indicated a broken | ||
| 36 | or invalid document. Or maybe a bug in PPI, but B<far> more likely a | ||
| 37 | broken Document. :) | ||
| 38 | |||
| 39 | =head1 METHODS | ||
| 40 | |||
| 41 | C<PPI::Statement::UnmatchedBrace> has no additional methods beyond the | ||
| 42 | default ones provided by L<PPI::Statement>, L<PPI::Node> and | ||
| 43 | L<PPI::Element>. | ||
| 44 | |||
| 45 | =cut | ||
| 46 | |||
| 47 | 63 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 48 | 63 | ▶ | use PPI::Statement (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 49 | |||
| 50 | 63 | our $VERSION = '1.260'; # VERSION | |
| 51 | |||
| 52 | 63 | our @ISA = "PPI::Statement"; | |
| 53 | |||
| 54 | # Once we've hit a naked unmatched brace we can never truly be complete. | ||
| 55 | # So instead we always just call it a day... | ||
| 56 | sub _complete () { 1 } | ||
| 57 | |||
| 58 | 63 | 1; | |
| 59 | |||
| 60 | =pod | ||
| 61 | |||
| 62 | =head1 SUPPORT | ||
| 63 | |||
| 64 | See the L<support section|PPI/SUPPORT> in the main module. | ||
| 65 | |||
| 66 | =head1 AUTHOR | ||
| 67 | |||
| 68 | Adam Kennedy E<lt>adamk@cpan.orgE<gt> | ||
| 69 | |||
| 70 | =head1 COPYRIGHT | ||
| 71 | |||
| 72 | Copyright 2001 - 2011 Adam Kennedy. | ||
| 73 | |||
| 74 | This program is free software; you can redistribute | ||
| 75 | it and/or modify it under the same terms as Perl itself. | ||
| 76 | |||
| 77 | The full text of the license can be found in the | ||
| 78 | LICENSE file included with this module. | ||
| 79 | |||
| 80 | =cut | ||