← Index
NYTProf Performance Profile   « line view »
For ./view
  Run on Fri Jul 31 18:42:36 2015
Reported on Fri Jul 31 18:48:15 2015

Filename/var/www/foswikidev/core/lib/Foswiki/If/OP_isweb.pm
StatementsExecuted 11 statements in 243µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11116µs29µsFoswiki::If::OP_isweb::::BEGIN@11Foswiki::If::OP_isweb::BEGIN@11
11114µs27µsFoswiki::If::OP_isweb::::newFoswiki::If::OP_isweb::new
1118µs12µsFoswiki::If::OP_isweb::::BEGIN@12Foswiki::If::OP_isweb::BEGIN@12
1114µs4µsFoswiki::If::OP_isweb::::BEGIN@17Foswiki::If::OP_isweb::BEGIN@17
1113µs3µsFoswiki::If::OP_isweb::::BEGIN@14Foswiki::If::OP_isweb::BEGIN@14
0000s0sFoswiki::If::OP_isweb::::evaluateFoswiki::If::OP_isweb::evaluate
Call graph for these subroutines as a Graphviz dot language file.
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::OP_isweb
6
7=cut
8
9package Foswiki::If::OP_isweb;
10
11226µs241µs
# spent 29µs (16+12) within Foswiki::If::OP_isweb::BEGIN@11 which was called: # once (16µs+12µs) by Foswiki::If::Parser::BEGIN@29 at line 11
use strict;
# spent 29µs making 1 call to Foswiki::If::OP_isweb::BEGIN@11 # spent 12µs making 1 call to strict::import
12223µs216µs
# spent 12µs (8+4) within Foswiki::If::OP_isweb::BEGIN@12 which was called: # once (8µs+4µs) by Foswiki::If::Parser::BEGIN@29 at line 12
use warnings;
# spent 12µs making 1 call to Foswiki::If::OP_isweb::BEGIN@12 # spent 4µs making 1 call to warnings::import
13
14254µs13µs
# spent 3µs within Foswiki::If::OP_isweb::BEGIN@14 which was called: # once (3µs+0s) by Foswiki::If::Parser::BEGIN@29 at line 14
use Foswiki::Query::UnaryOP ();
# spent 3µs making 1 call to Foswiki::If::OP_isweb::BEGIN@14
1518µsour @ISA = ('Foswiki::Query::UnaryOP');
16
17
# spent 4µs within Foswiki::If::OP_isweb::BEGIN@17 which was called: # once (4µs+0s) by Foswiki::If::Parser::BEGIN@29 at line 22
BEGIN {
1814µs if ( $Foswiki::cfg{UseLocale} ) {
19 require locale;
20 import locale();
21 }
221114µs14µs}
# spent 4µs making 1 call to Foswiki::If::OP_isweb::BEGIN@17
23
24
# spent 27µs (14+13) within Foswiki::If::OP_isweb::new which was called: # once (14µs+13µs) by Foswiki::If::Parser::new at line 49 of /var/www/foswikidev/core/lib/Foswiki/If/Parser.pm
sub new {
251300ns my $class = shift;
26113µs113µs return $class->SUPER::new(
# spent 13µs making 1 call to Foswiki::Query::UnaryOP::new
27 name => 'isweb',
28 prec => 600
29 );
30}
31
32sub evaluate {
33 my $this = shift;
34 my $node = shift;
35 my $a = $node->{params}->[0];
36 my %domain = @_;
37 my $session = $domain{tom}->session;
38 throw Error::Simple(
39 'No context in which to evaluate "' . $a->stringify() . '"' )
40 unless $session;
41 my $web = $a->_evaluate(@_) || '';
42 return $session->webExists($web) ? 1 : 0;
43}
44
4513µs1;
46__END__