Filename | /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/PPI/Statement/Null.pm |
Statements | Executed 9 statements in 111µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 12µs | 24µs | BEGIN@43 | PPI::Statement::Null::
1 | 1 | 1 | 10µs | 38µs | BEGIN@46 | PPI::Statement::Null::
1 | 1 | 1 | 8µs | 8µs | BEGIN@47 | PPI::Statement::Null::
1 | 1 | 1 | 3µs | 3µs | BEGIN@44 | PPI::Statement::Null::
0 | 0 | 0 | 0s | 0s | significant | PPI::Statement::Null::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package PPI::Statement::Null; | ||||
2 | |||||
3 | =pod | ||||
4 | |||||
5 | =head1 NAME | ||||
6 | |||||
7 | PPI::Statement::Null - A useless null statement | ||||
8 | |||||
9 | =head1 SYNOPSIS | ||||
10 | |||||
11 | my $foo = 1; | ||||
12 | |||||
13 | ; # <-- Null statement | ||||
14 | |||||
15 | my $bar = 1; | ||||
16 | |||||
17 | =head1 INHERITANCE | ||||
18 | |||||
19 | PPI::Statement::Null | ||||
20 | isa PPI::Statement | ||||
21 | isa PPI::Node | ||||
22 | isa PPI::Element | ||||
23 | |||||
24 | =head1 DESCRIPTION | ||||
25 | |||||
26 | C<PPI::Statement::Null> is a utility class designed to handle situations | ||||
27 | where PPI encounters a naked statement separator. | ||||
28 | |||||
29 | Although strictly speaking, the semicolon is a statement B<separator> | ||||
30 | and not a statement B<terminator>, PPI considers a semicolon to be a | ||||
31 | statement terminator under most circumstances. | ||||
32 | |||||
33 | In any case, the null statement has no purpose, and can be safely deleted | ||||
34 | with no ill effect. | ||||
35 | |||||
36 | =head1 METHODS | ||||
37 | |||||
38 | C<PPI::Statement::Null> has no additional methods beyond the default ones | ||||
39 | provided by L<PPI::Statement>, L<PPI::Node> and L<PPI::Element>. | ||||
40 | |||||
41 | =cut | ||||
42 | |||||
43 | 2 | 20µs | 2 | 36µs | # spent 24µs (12+12) within PPI::Statement::Null::BEGIN@43 which was called:
# once (12µs+12µs) by PPI::Statement::BEGIN@168 at line 43 # spent 24µs making 1 call to PPI::Statement::Null::BEGIN@43
# spent 12µs making 1 call to strict::import |
44 | 2 | 18µs | 1 | 3µs | # spent 3µs within PPI::Statement::Null::BEGIN@44 which was called:
# once (3µs+0s) by PPI::Statement::BEGIN@168 at line 44 # spent 3µs making 1 call to PPI::Statement::Null::BEGIN@44 |
45 | |||||
46 | 2 | 28µs | 2 | 65µs | # spent 38µs (10+28) within PPI::Statement::Null::BEGIN@46 which was called:
# once (10µs+28µs) by PPI::Statement::BEGIN@168 at line 46 # spent 38µs making 1 call to PPI::Statement::Null::BEGIN@46
# spent 28µs making 1 call to vars::import |
47 | # spent 8µs within PPI::Statement::Null::BEGIN@47 which was called:
# once (8µs+0s) by PPI::Statement::BEGIN@168 at line 50 | ||||
48 | 1 | 400ns | $VERSION = '1.215'; | ||
49 | 1 | 12µs | @ISA = 'PPI::Statement'; | ||
50 | 1 | 31µs | 1 | 8µs | } # spent 8µs making 1 call to PPI::Statement::Null::BEGIN@47 |
51 | |||||
52 | # A null statement is not significant | ||||
53 | sub significant { '' } | ||||
54 | |||||
55 | 1 | 2µs | 1; | ||
56 | |||||
57 | =pod | ||||
58 | |||||
59 | =head1 SUPPORT | ||||
60 | |||||
61 | See the L<support section|PPI/SUPPORT> in the main module. | ||||
62 | |||||
63 | =head1 AUTHOR | ||||
64 | |||||
65 | Adam Kennedy E<lt>adamk@cpan.orgE<gt> | ||||
66 | |||||
67 | =head1 COPYRIGHT | ||||
68 | |||||
69 | Copyright 2001 - 2011 Adam Kennedy. | ||||
70 | |||||
71 | This program is free software; you can redistribute | ||||
72 | it and/or modify it under the same terms as Perl itself. | ||||
73 | |||||
74 | The full text of the license can be found in the | ||||
75 | LICENSE file included with this module. | ||||
76 | |||||
77 | =cut |