| Filename | /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/PPI/Statement/UnmatchedBrace.pm |
| Statements | Executed 9 statements in 109µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 12µs | 23µs | PPI::Statement::UnmatchedBrace::BEGIN@47 |
| 1 | 1 | 1 | 8µs | 8µs | PPI::Statement::UnmatchedBrace::BEGIN@51 |
| 1 | 1 | 1 | 6µs | 33µs | PPI::Statement::UnmatchedBrace::BEGIN@50 |
| 1 | 1 | 1 | 3µs | 3µs | PPI::Statement::UnmatchedBrace::BEGIN@48 |
| Line | State ments |
Time on line |
Calls | Time in subs |
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<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 | 2 | 22µs | 2 | 34µs | # spent 23µs (12+11) within PPI::Statement::UnmatchedBrace::BEGIN@47 which was called:
# once (12µs+11µs) by PPI::Statement::BEGIN@173 at line 47 # spent 23µs making 1 call to PPI::Statement::UnmatchedBrace::BEGIN@47
# spent 11µs making 1 call to strict::import |
| 48 | 2 | 19µs | 1 | 3µs | # spent 3µs within PPI::Statement::UnmatchedBrace::BEGIN@48 which was called:
# once (3µs+0s) by PPI::Statement::BEGIN@173 at line 48 # spent 3µs making 1 call to PPI::Statement::UnmatchedBrace::BEGIN@48 |
| 49 | |||||
| 50 | 2 | 27µs | 2 | 60µs | # spent 33µs (6+27) within PPI::Statement::UnmatchedBrace::BEGIN@50 which was called:
# once (6µs+27µs) by PPI::Statement::BEGIN@173 at line 50 # spent 33µs making 1 call to PPI::Statement::UnmatchedBrace::BEGIN@50
# spent 27µs making 1 call to vars::import |
| 51 | # spent 8µs within PPI::Statement::UnmatchedBrace::BEGIN@51 which was called:
# once (8µs+0s) by PPI::Statement::BEGIN@173 at line 54 | ||||
| 52 | 1 | 400ns | $VERSION = '1.215'; | ||
| 53 | 1 | 8µs | @ISA = 'PPI::Statement'; | ||
| 54 | 1 | 31µs | 1 | 8µs | } # spent 8µs making 1 call to PPI::Statement::UnmatchedBrace::BEGIN@51 |
| 55 | |||||
| 56 | # Once we've hit a naked unmatched brace we can never truly be complete. | ||||
| 57 | # So instead we always just call it a day... | ||||
| 58 | sub _complete () { 1 } | ||||
| 59 | |||||
| 60 | 1 | 2µs | 1; | ||
| 61 | |||||
| 62 | =pod | ||||
| 63 | |||||
| 64 | =head1 SUPPORT | ||||
| 65 | |||||
| 66 | See the L<support section|PPI/SUPPORT> in the main module. | ||||
| 67 | |||||
| 68 | =head1 AUTHOR | ||||
| 69 | |||||
| 70 | Adam Kennedy E<lt>adamk@cpan.orgE<gt> | ||||
| 71 | |||||
| 72 | =head1 COPYRIGHT | ||||
| 73 | |||||
| 74 | Copyright 2001 - 2011 Adam Kennedy. | ||||
| 75 | |||||
| 76 | This program is free software; you can redistribute | ||||
| 77 | it and/or modify it under the same terms as Perl itself. | ||||
| 78 | |||||
| 79 | The full text of the license can be found in the | ||||
| 80 | LICENSE file included with this module. | ||||
| 81 | |||||
| 82 | =cut |