Filename | /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/PPI/Statement/Given.pm |
Statements | Executed 9 statements in 161µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 12µs | 23µs | BEGIN@36 | PPI::Statement::Given::
1 | 1 | 1 | 8µs | 8µs | BEGIN@40 | PPI::Statement::Given::
1 | 1 | 1 | 7µs | 33µs | BEGIN@39 | PPI::Statement::Given::
1 | 1 | 1 | 3µs | 3µs | BEGIN@37 | PPI::Statement::Given::
0 | 0 | 0 | 0s | 0s | __LEXER__normal | PPI::Statement::Given::
0 | 0 | 0 | 0s | 0s | _complete | PPI::Statement::Given::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package PPI::Statement::Given; | ||||
2 | |||||
3 | =pod | ||||
4 | |||||
5 | =head1 NAME | ||||
6 | |||||
7 | PPI::Statement::Given - Describes all compound statements | ||||
8 | |||||
9 | =head1 SYNOPSIS | ||||
10 | |||||
11 | given ( foo ) { | ||||
12 | say $_; | ||||
13 | } | ||||
14 | |||||
15 | =head1 INHERITANCE | ||||
16 | |||||
17 | PPI::Statement::Given | ||||
18 | isa PPI::Statement | ||||
19 | isa PPI::Node | ||||
20 | isa PPI::Element | ||||
21 | |||||
22 | =head1 DESCRIPTION | ||||
23 | |||||
24 | C<PPI::Statement::Given> objects are used to describe switch statements, as | ||||
25 | described in L<perlsyn>. | ||||
26 | |||||
27 | =head1 METHODS | ||||
28 | |||||
29 | C<PPI::Statement::Given> has no methods beyond those provided by the | ||||
30 | standard L<PPI::Structure>, L<PPI::Node> and L<PPI::Element> methods. | ||||
31 | |||||
32 | Got any ideas for methods? Submit a report to rt.cpan.org! | ||||
33 | |||||
34 | =cut | ||||
35 | |||||
36 | 2 | 19µs | 2 | 35µs | # spent 23µs (12+12) within PPI::Statement::Given::BEGIN@36 which was called:
# once (12µs+12µs) by PPI::Statement::BEGIN@172 at line 36 # spent 23µs making 1 call to PPI::Statement::Given::BEGIN@36
# spent 12µs making 1 call to strict::import |
37 | 2 | 22µs | 1 | 3µs | # spent 3µs within PPI::Statement::Given::BEGIN@37 which was called:
# once (3µs+0s) by PPI::Statement::BEGIN@172 at line 37 # spent 3µs making 1 call to PPI::Statement::Given::BEGIN@37 |
38 | |||||
39 | 2 | 31µs | 2 | 60µs | # spent 33µs (7+27) within PPI::Statement::Given::BEGIN@39 which was called:
# once (7µs+27µs) by PPI::Statement::BEGIN@172 at line 39 # spent 33µs making 1 call to PPI::Statement::Given::BEGIN@39
# spent 27µs making 1 call to vars::import |
40 | # spent 8µs within PPI::Statement::Given::BEGIN@40 which was called:
# once (8µs+0s) by PPI::Statement::BEGIN@172 at line 43 | ||||
41 | 1 | 400ns | $VERSION = '1.215'; | ||
42 | 1 | 8µs | @ISA = 'PPI::Statement'; | ||
43 | 1 | 79µs | 1 | 8µs | } # spent 8µs making 1 call to PPI::Statement::Given::BEGIN@40 |
44 | |||||
45 | # Lexer clues | ||||
46 | sub __LEXER__normal { '' } | ||||
47 | |||||
48 | sub _complete { | ||||
49 | my $child = $_[0]->schild(-1); | ||||
50 | return !! ( | ||||
51 | defined $child | ||||
52 | and | ||||
53 | $child->isa('PPI::Structure::Block') | ||||
54 | and | ||||
55 | $child->complete | ||||
56 | ); | ||||
57 | } | ||||
58 | |||||
- - | |||||
63 | ##################################################################### | ||||
64 | # PPI::Node Methods | ||||
65 | |||||
66 | sub scope () { 1 } | ||||
67 | |||||
68 | 1 | 2µs | 1; | ||
69 | |||||
70 | =pod | ||||
71 | |||||
72 | =head1 TO DO | ||||
73 | |||||
74 | - Write unit tests for this package | ||||
75 | |||||
76 | =head1 SUPPORT | ||||
77 | |||||
78 | See the L<support section|PPI/SUPPORT> in the main module. | ||||
79 | |||||
80 | =head1 AUTHOR | ||||
81 | |||||
82 | Adam Kennedy E<lt>adamk@cpan.orgE<gt> | ||||
83 | |||||
84 | =head1 COPYRIGHT | ||||
85 | |||||
86 | Copyright 2001 - 2011 Adam Kennedy. | ||||
87 | |||||
88 | This program is free software; you can redistribute | ||||
89 | it and/or modify it under the same terms as Perl itself. | ||||
90 | |||||
91 | The full text of the license can be found in the | ||||
92 | LICENSE file included with this module. | ||||
93 | |||||
94 | =cut |