← 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 17:10:45 2013
Reported on Tue Oct 15 17:11:47 2013

Filename/usr/lib/perl5/XML/LibXML/Literal.pm
StatementsExecuted 17 statements in 570µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11157µs108µsXML::LibXML::Literal::::BEGIN@15XML::LibXML::Literal::BEGIN@15
11129µs100µsXML::LibXML::Literal::::BEGIN@19XML::LibXML::Literal::BEGIN@19
11121µs24µsXML::LibXML::Literal::::BEGIN@11XML::LibXML::Literal::BEGIN@11
11118µs20µsXML::LibXML::Literal::::BEGIN@12XML::LibXML::Literal::BEGIN@12
1119µs13µsXML::LibXML::Literal::::BEGIN@13XML::LibXML::Literal::BEGIN@13
0000s0sXML::LibXML::Literal::::as_stringXML::LibXML::Literal::as_string
0000s0sXML::LibXML::Literal::::as_xmlXML::LibXML::Literal::as_xml
0000s0sXML::LibXML::Literal::::cmpXML::LibXML::Literal::cmp
0000s0sXML::LibXML::Literal::::evaluateXML::LibXML::Literal::evaluate
0000s0sXML::LibXML::Literal::::newXML::LibXML::Literal::new
0000s0sXML::LibXML::Literal::::string_valueXML::LibXML::Literal::string_value
0000s0sXML::LibXML::Literal::::to_booleanXML::LibXML::Literal::to_boolean
0000s0sXML::LibXML::Literal::::to_literalXML::LibXML::Literal::to_literal
0000s0sXML::LibXML::Literal::::to_numberXML::LibXML::Literal::to_number
0000s0sXML::LibXML::Literal::::valueXML::LibXML::Literal::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: Literal.pm 785 2009-07-16 14:17:46Z pajas $
2#
3# This is free software, you may use it and distribute it under the same terms as
4# Perl itself.
5#
6# Copyright 2001-2003 AxKit.com Ltd., 2002-2006 Christian Glahn, 2006-2009 Petr Pajas
7#
8#
9
10package XML::LibXML::Literal;
11328µs226µs
# spent 24µs (21+2) within XML::LibXML::Literal::BEGIN@11 which was called: # once (21µs+2µs) by XML::LibXML::Number::BEGIN@12 at line 11
use XML::LibXML::Boolean;
# spent 24µs making 1 call to XML::LibXML::Literal::BEGIN@11 # spent 2µs making 1 call to UNIVERSAL::import
12333µs222µs
# spent 20µs (18+2) within XML::LibXML::Literal::BEGIN@12 which was called: # once (18µs+2µs) by XML::LibXML::Number::BEGIN@12 at line 12
use XML::LibXML::Number;
# spent 20µs making 1 call to XML::LibXML::Literal::BEGIN@12 # spent 2µs making 1 call to UNIVERSAL::import
13327µs216µs
# spent 13µs (9+4) within XML::LibXML::Literal::BEGIN@13 which was called: # once (9µs+4µs) by XML::LibXML::Number::BEGIN@12 at line 13
use strict;
# spent 13µs making 1 call to XML::LibXML::Literal::BEGIN@13 # spent 4µs making 1 call to strict::import
14
15398µs2159µs
# spent 108µs (57+51) within XML::LibXML::Literal::BEGIN@15 which was called: # once (57µs+51µs) by XML::LibXML::Number::BEGIN@12 at line 15
use vars qw ($VERSION);
# spent 108µs making 1 call to XML::LibXML::Literal::BEGIN@15 # spent 51µs making 1 call to vars::import
1611µs$VERSION = "1.70"; # VERSION TEMPLATE: DO NOT CHANGE
17
18use overload
19171µs
# spent 100µs (29+71) within XML::LibXML::Literal::BEGIN@19 which was called: # once (29µs+71µs) by XML::LibXML::Number::BEGIN@12 at line 20
'""' => \&value,
# spent 71µs making 1 call to overload::import
203379µs1100µs 'cmp' => \&cmp;
# spent 100µs making 1 call to XML::LibXML::Literal::BEGIN@19
21
22sub new {
23 my $class = shift;
24 my ($string) = @_;
25
26# $string =~ s/"/"/g;
27# $string =~ s/'/'/g;
28
29 bless \$string, $class;
30}
31
32sub as_string {
33 my $self = shift;
34 my $string = $$self;
35 $string =~ s/'/'/g;
36 return "'$string'";
37}
38
39sub as_xml {
40 my $self = shift;
41 my $string = $$self;
42 return "<Literal>$string</Literal>\n";
43}
44
45sub value {
46 my $self = shift;
47 $$self;
48}
49
50sub cmp {
51 my $self = shift;
52 my ($cmp, $swap) = @_;
53 if ($swap) {
54 return $cmp cmp $$self;
55 }
56 return $$self cmp $cmp;
57}
58
59sub evaluate {
60 my $self = shift;
61 $self;
62}
63
64sub to_boolean {
65 my $self = shift;
66 return (length($$self) > 0) ? XML::LibXML::Boolean->True : XML::LibXML::Boolean->False;
67}
68
69sub to_number { return XML::LibXML::Number->new($_[0]->value); }
70sub to_literal { return $_[0]; }
71
72sub string_value { return $_[0]->value; }
73
7413µs1;
75__END__