Filename | /var/www/foswikidev/core/lib/Foswiki/If/Node.pm |
Statements | Executed 101 statements in 343µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
46 | 5 | 5 | 89µs | 89µs | _evaluate | Foswiki::If::Node::
1 | 1 | 1 | 13µs | 26µs | BEGIN@13 | Foswiki::If::Node::
1 | 1 | 1 | 8µs | 12µs | BEGIN@14 | Foswiki::If::Node::
1 | 1 | 1 | 4µs | 4µs | BEGIN@19 | Foswiki::If::Node::
1 | 1 | 1 | 3µs | 3µs | BEGIN@16 | Foswiki::If::Node::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # See bottom of file for license and copyright information | ||||
2 | |||||
3 | =begin TML | ||||
4 | |||||
5 | ---+ package Foswiki::If::Node | ||||
6 | |||||
7 | Node class for the result of an If statement parse | ||||
8 | |||||
9 | =cut | ||||
10 | |||||
11 | package Foswiki::If::Node; | ||||
12 | |||||
13 | 2 | 29µs | 2 | 38µs | # spent 26µs (13+12) within Foswiki::If::Node::BEGIN@13 which was called:
# once (13µs+12µs) by Foswiki::If::Parser::BEGIN@20 at line 13 # spent 26µs making 1 call to Foswiki::If::Node::BEGIN@13
# spent 12µs making 1 call to strict::import |
14 | 2 | 21µs | 2 | 16µs | # spent 12µs (8+4) within Foswiki::If::Node::BEGIN@14 which was called:
# once (8µs+4µs) by Foswiki::If::Parser::BEGIN@20 at line 14 # spent 12µs making 1 call to Foswiki::If::Node::BEGIN@14
# spent 4µs making 1 call to warnings::import |
15 | |||||
16 | 2 | 56µs | 1 | 3µs | # spent 3µs within Foswiki::If::Node::BEGIN@16 which was called:
# once (3µs+0s) by Foswiki::If::Parser::BEGIN@20 at line 16 # spent 3µs making 1 call to Foswiki::If::Node::BEGIN@16 |
17 | 1 | 7µs | our @ISA = ('Foswiki::Query::Node'); | ||
18 | |||||
19 | # spent 4µs within Foswiki::If::Node::BEGIN@19 which was called:
# once (4µs+0s) by Foswiki::If::Parser::BEGIN@20 at line 24 | ||||
20 | 1 | 5µs | if ( $Foswiki::cfg{UseLocale} ) { | ||
21 | require locale; | ||||
22 | import locale(); | ||||
23 | } | ||||
24 | 1 | 77µs | 1 | 4µs | } # spent 4µs making 1 call to Foswiki::If::Node::BEGIN@19 |
25 | |||||
26 | # Used wherever a plain string is expected, this method | ||||
27 | # suppresses automatic lookup of names in meta-data | ||||
28 | # spent 89µs within Foswiki::If::Node::_evaluate which was called 46 times, avg 2µs/call:
# 16 times (33µs+0s) by Foswiki::If::OP_dollar::evaluate at line 41 of /var/www/foswikidev/core/lib/Foswiki/If/OP_dollar.pm, avg 2µs/call
# 13 times (25µs+0s) by Foswiki::If::OP_defined::evaluate at line 40 of /var/www/foswikidev/core/lib/Foswiki/If/OP_defined.pm, avg 2µs/call
# 12 times (21µs+0s) by Foswiki::If::OP_context::evaluate at line 37 of /var/www/foswikidev/core/lib/Foswiki/If/OP_context.pm, avg 2µs/call
# 4 times (9µs+0s) by Foswiki::If::OP_istopic::evaluate at line 38 of /var/www/foswikidev/core/lib/Foswiki/If/OP_istopic.pm, avg 2µs/call
# once (2µs+0s) by Foswiki::If::OP_allows::evaluate at line 38 of /var/www/foswikidev/core/lib/Foswiki/If/OP_allows.pm | ||||
29 | 46 | 9µs | my $this = shift; | ||
30 | |||||
31 | 46 | 137µs | if ( !ref( $this->{op} ) ) { | ||
32 | return $this->{params}[0]; | ||||
33 | } | ||||
34 | else { | ||||
35 | if ( $this->{op}->{name} eq '(' ) { | ||||
36 | return $this->{params}[0]->_evaluate(@_); | ||||
37 | } | ||||
38 | return $this->evaluate(@_); | ||||
39 | } | ||||
40 | } | ||||
41 | |||||
42 | 1 | 3µs | 1; | ||
43 | __END__ |