line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
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 class is a miscellaneous utility |
27
|
|
|
|
|
|
|
class. Objects of this type should be rare, or not exist at all in normal |
28
|
|
|
|
|
|
|
valid L 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 indicated a broken |
36
|
|
|
|
|
|
|
or invalid document. Or maybe a bug in PPI, but B more likely a |
37
|
|
|
|
|
|
|
broken Document. :) |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 METHODS |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
C has no additional methods beyond the |
42
|
|
|
|
|
|
|
default ones provided by L, L and |
43
|
|
|
|
|
|
|
L. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=cut |
46
|
|
|
|
|
|
|
|
47
|
63
|
|
|
63
|
|
967
|
use strict; |
|
63
|
|
|
|
|
138
|
|
|
63
|
|
|
|
|
1438
|
|
48
|
63
|
|
|
63
|
|
288
|
use PPI::Statement (); |
|
63
|
|
|
|
|
110
|
|
|
63
|
|
|
|
|
3745
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
our $VERSION = '1.275'; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
1; |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=pod |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 SUPPORT |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
See the L in the main module. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 AUTHOR |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Adam Kennedy Eadamk@cpan.orgE |
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 |