← Index
NYTProf Performance Profile   « line view »
For /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/bin/perlcritic
  Run on Sat Mar 19 22:12:22 2016
Reported on Sat Mar 19 22:14:12 2016

Filename/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/PPI/Statement/When.pm
StatementsExecuted 9 statements in 183µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11112µs24µsPPI::Statement::When::::BEGIN@44PPI::Statement::When::BEGIN@44
1119µs9µsPPI::Statement::When::::BEGIN@48PPI::Statement::When::BEGIN@48
1117µs35µsPPI::Statement::When::::BEGIN@47PPI::Statement::When::BEGIN@47
1113µs3µsPPI::Statement::When::::BEGIN@45PPI::Statement::When::BEGIN@45
0000s0sPPI::Statement::When::::__LEXER__normalPPI::Statement::When::__LEXER__normal
0000s0sPPI::Statement::When::::_completePPI::Statement::When::_complete
0000s0sPPI::Statement::When::::scopePPI::Statement::When::scope
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package PPI::Statement::When;
2
3=pod
4
5=head1 NAME
6
7PPI::Statement::When - Describes all compound statements
8
9=head1 SYNOPSIS
10
11 foreach ( qw/ foo bar baz / ) {
12 when ( m/b/ ) {
13 boing($_);
14 }
15 when ( m/f/ ) {
16 boom($_);
17 }
18 default {
19 tchak($_);
20 }
21 }
22
23=head1 INHERITANCE
24
25 PPI::Statement::When
26 isa PPI::Statement
27 isa PPI::Node
28 isa PPI::Element
29
30=head1 DESCRIPTION
31
32C<PPI::Statement::When> objects are used to describe when and default
33statements, as described in L<perlsyn>.
34
35=head1 METHODS
36
37C<PPI::Structure::When> has no methods beyond those provided by the
38standard L<PPI::Structure>, L<PPI::Node> and L<PPI::Element> methods.
39
40Got any ideas for methods? Submit a report to rt.cpan.org!
41
42=cut
43
44237µs236µs
# spent 24µs (12+12) within PPI::Statement::When::BEGIN@44 which was called: # once (12µs+12µs) by PPI::Statement::BEGIN@176 at line 44
use strict;
# spent 24µs making 1 call to PPI::Statement::When::BEGIN@44 # spent 12µs making 1 call to strict::import
45219µs13µs
# spent 3µs within PPI::Statement::When::BEGIN@45 which was called: # once (3µs+0s) by PPI::Statement::BEGIN@176 at line 45
use PPI::Statement ();
# spent 3µs making 1 call to PPI::Statement::When::BEGIN@45
46
47231µs264µs
# spent 35µs (7+28) within PPI::Statement::When::BEGIN@47 which was called: # once (7µs+28µs) by PPI::Statement::BEGIN@176 at line 47
use vars qw{$VERSION @ISA};
# spent 35µs making 1 call to PPI::Statement::When::BEGIN@47 # spent 28µs making 1 call to vars::import
48
# spent 9µs within PPI::Statement::When::BEGIN@48 which was called: # once (9µs+0s) by PPI::Statement::BEGIN@176 at line 51
BEGIN {
491400ns $VERSION = '1.215';
5019µs @ISA = 'PPI::Statement';
51184µs19µs}
# spent 9µs making 1 call to PPI::Statement::When::BEGIN@48
52
53# Lexer clues
54sub __LEXER__normal { '' }
55
56sub _complete {
57 my $child = $_[0]->schild(-1);
58 return !! (
59 defined $child
60 and
61 $child->isa('PPI::Structure::Block')
62 and
63 $child->complete
64 );
65}
66
- -
71#####################################################################
72# PPI::Node Methods
73
74sub scope {
75 1;
76}
77
7812µs1;
79
80=pod
81
82=head1 TO DO
83
84- Write unit tests for this package
85
86=head1 SUPPORT
87
88See the L<support section|PPI/SUPPORT> in the main module.
89
90=head1 AUTHOR
91
92Adam Kennedy E<lt>adamk@cpan.orgE<gt>
93
94=head1 COPYRIGHT
95
96Copyright 2001 - 2011 Adam Kennedy.
97
98This program is free software; you can redistribute
99it and/or modify it under the same terms as Perl itself.
100
101The full text of the license can be found in the
102LICENSE file included with this module.
103
104=cut