← Index
NYTProf Performance Profile   « block view • line view • sub view »
For /usr/share/koha/opac/cgi-bin/opac/opac-search.pl
  Run on Tue Oct 15 11:58:52 2013
Reported on Tue Oct 15 12:01:03 2013

Filename/usr/lib/perl5/XML/LibXML/Boolean.pm
StatementsExecuted 17 statements in 632µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111717µs2.11msXML::LibXML::Boolean::::BEGIN@12XML::LibXML::Boolean::BEGIN@12
11117µs51µsXML::LibXML::Boolean::::BEGIN@21XML::LibXML::Boolean::BEGIN@21
11110µs15µsXML::LibXML::Boolean::::BEGIN@14XML::LibXML::Boolean::BEGIN@14
11110µs40µsXML::LibXML::Boolean::::BEGIN@16XML::LibXML::Boolean::BEGIN@16
1117µs7µsXML::LibXML::Boolean::::BEGIN@13XML::LibXML::Boolean::BEGIN@13
0000s0sXML::LibXML::Boolean::::FalseXML::LibXML::Boolean::False
0000s0sXML::LibXML::Boolean::::TrueXML::LibXML::Boolean::True
0000s0sXML::LibXML::Boolean::::cmpXML::LibXML::Boolean::cmp
0000s0sXML::LibXML::Boolean::::newXML::LibXML::Boolean::new
0000s0sXML::LibXML::Boolean::::string_valueXML::LibXML::Boolean::string_value
0000s0sXML::LibXML::Boolean::::to_booleanXML::LibXML::Boolean::to_boolean
0000s0sXML::LibXML::Boolean::::to_literalXML::LibXML::Boolean::to_literal
0000s0sXML::LibXML::Boolean::::to_numberXML::LibXML::Boolean::to_number
0000s0sXML::LibXML::Boolean::::valueXML::LibXML::Boolean::value
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# $Id: Boolean.pm 785 2009-07-16 14:17:46Z pajas $
2#
3#
4# This is free software, you may use it and distribute it under the same terms as
5# Perl itself.
6#
7# Copyright 2001-2003 AxKit.com Ltd., 2002-2006 Christian Glahn, 2006-2009 Petr Pajas
8#
9#
10
11package XML::LibXML::Boolean;
123179µs12.11ms
# spent 2.11ms (717µs+1.39) within XML::LibXML::Boolean::BEGIN@12 which was called: # once (717µs+1.39ms) by XML::LibXML::NodeList::BEGIN@12 at line 12
use XML::LibXML::Number;
# spent 2.11ms making 1 call to XML::LibXML::Boolean::BEGIN@12
13325µs17µs
# spent 7µs within XML::LibXML::Boolean::BEGIN@13 which was called: # once (7µs+0s) by XML::LibXML::NodeList::BEGIN@12 at line 13
use XML::LibXML::Literal;
# spent 7µs making 1 call to XML::LibXML::Boolean::BEGIN@13
14329µs221µs
# spent 15µs (10+5) within XML::LibXML::Boolean::BEGIN@14 which was called: # once (10µs+5µs) by XML::LibXML::NodeList::BEGIN@12 at line 14
use strict;
# spent 15µs making 1 call to XML::LibXML::Boolean::BEGIN@14 # spent 5µs making 1 call to strict::import
15
16354µs270µs
# spent 40µs (10+30) within XML::LibXML::Boolean::BEGIN@16 which was called: # once (10µs+30µs) by XML::LibXML::NodeList::BEGIN@12 at line 16
use vars qw ($VERSION);
# spent 40µs making 1 call to XML::LibXML::Boolean::BEGIN@16 # spent 30µs making 1 call to vars::import
17
181800ns$VERSION = "1.70"; # VERSION TEMPLATE: DO NOT CHANGE
19
20use overload
21134µs
# spent 51µs (17+34) within XML::LibXML::Boolean::BEGIN@21 which was called: # once (17µs+34µs) by XML::LibXML::NodeList::BEGIN@12 at line 22
'""' => \&value,
# spent 34µs making 1 call to overload::import
223341µs151µs '<=>' => \&cmp;
# spent 51µs making 1 call to XML::LibXML::Boolean::BEGIN@21
23
24sub new {
25 my $class = shift;
26 my ($param) = @_;
27 my $val = $param ? 1 : 0;
28 bless \$val, $class;
29}
30
31sub True {
32 my $class = shift;
33 my $val = 1;
34 bless \$val, $class;
35}
36
37sub False {
38 my $class = shift;
39 my $val = 0;
40 bless \$val, $class;
41}
42
43sub value {
44 my $self = shift;
45 $$self;
46}
47
48sub cmp {
49 my $self = shift;
50 my ($other, $swap) = @_;
51 if ($swap) {
52 return $other <=> $$self;
53 }
54 return $$self <=> $other;
55}
56
57sub to_number { XML::LibXML::Number->new($_[0]->value); }
58sub to_boolean { $_[0]; }
59sub to_literal { XML::LibXML::Literal->new($_[0]->value ? "true" : "false"); }
60
61sub string_value { return $_[0]->to_literal->value; }
62
6313µs1;
64__END__