← 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:02:15 2013

Filename/usr/share/perl5/DateTime/Format/Builder/Parser/Dispatch.pm
StatementsExecuted 21 statements in 439µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11124µs29µsDateTime::Format::Builder::Parser::Dispatch::::BEGIN@2DateTime::Format::Builder::Parser::Dispatch::BEGIN@2
11117µs83µsDateTime::Format::Builder::Parser::Dispatch::::BEGIN@4DateTime::Format::Builder::Parser::Dispatch::BEGIN@4
11113µs13µsDateTime::Format::Builder::Parser::Dispatch::::BEGIN@5DateTime::Format::Builder::Parser::Dispatch::BEGIN@5
11112µs52µsDateTime::Format::Builder::Parser::Dispatch::::BEGIN@3DateTime::Format::Builder::Parser::Dispatch::BEGIN@3
1119µs22µsDateTime::Format::Builder::Parser::Dispatch::::BEGIN@78DateTime::Format::Builder::Parser::Dispatch::BEGIN@78
0000s0sDateTime::Format::Builder::Parser::Dispatch::::__ANON__[:111]DateTime::Format::Builder::Parser::Dispatch::__ANON__[:111]
0000s0sDateTime::Format::Builder::Parser::Dispatch::::create_parserDateTime::Format::Builder::Parser::Dispatch::create_parser
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package DateTime::Format::Builder::Parser::Dispatch;
2344µs233µs
# spent 29µs (24+4) within DateTime::Format::Builder::Parser::Dispatch::BEGIN@2 which was called: # once (24µs+4µs) by DateTime::Format::Builder::Parser::BEGIN@1 at line 2
use strict;
# spent 29µs making 1 call to DateTime::Format::Builder::Parser::Dispatch::BEGIN@2 # spent 4µs making 1 call to strict::import
3342µs293µs
# spent 52µs (12+40) within DateTime::Format::Builder::Parser::Dispatch::BEGIN@3 which was called: # once (12µs+40µs) by DateTime::Format::Builder::Parser::BEGIN@1 at line 3
use vars qw( $VERSION %dispatch_data );
# spent 52µs making 1 call to DateTime::Format::Builder::Parser::Dispatch::BEGIN@3 # spent 40µs making 1 call to vars::import
4347µs2149µs
# spent 83µs (17+66) within DateTime::Format::Builder::Parser::Dispatch::BEGIN@4 which was called: # once (17µs+66µs) by DateTime::Format::Builder::Parser::BEGIN@1 at line 4
use Params::Validate qw( CODEREF validate );
# spent 83µs making 1 call to DateTime::Format::Builder::Parser::Dispatch::BEGIN@4 # spent 66µs making 1 call to Exporter::import
5357µs113µs
# spent 13µs within DateTime::Format::Builder::Parser::Dispatch::BEGIN@5 which was called: # once (13µs+0s) by DateTime::Format::Builder::Parser::BEGIN@1 at line 5
use DateTime::Format::Builder::Parser;
6
7=head1 NAME
8
- -
7512µs$VERSION = '0.78';
76
77{
784228µs236µs
# spent 22µs (9+14) within DateTime::Format::Builder::Parser::Dispatch::BEGIN@78 which was called: # once (9µs+14µs) by DateTime::Format::Builder::Parser::BEGIN@1 at line 78
no strict 'refs';
# spent 22µs making 1 call to DateTime::Format::Builder::Parser::Dispatch::BEGIN@78 # spent 14µs making 1 call to strict::unimport
7913µs *dispatch_data = *DateTime::Format::Builder::dispatch_data;
8012µs *params = *DateTime::Format::Builder::Parser::params;
81}
82
83DateTime::Format::Builder::Parser->valid_params(
8418µs120µs Dispatch => {
# spent 20µs making 1 call to DateTime::Format::Builder::Parser::valid_params
85 type => CODEREF,
86 }
87);
88
89sub create_parser
90{
91 my ($self, %args) = @_;
92 my $coderef = $args{Dispatch};
93
94 return sub {
95 my ($self, $date, $p, @args) = @_;
96 return unless defined $date;
97 my $class = ref($self)||$self;
98
99 my @results = $coderef->( $date );
100 return unless @results;
101 return unless defined $results[0];
102
103 for my $group (@results)
104 {
105 my $parser = $dispatch_data{$class}{$group};
106 die "Unknown parsing group: $class\n" unless defined $parser;
107 my $rv = eval { $parser->parse( $self, $date, $p, @args ) };
108 return $rv unless $@ or not defined $rv;
109 }
110 return;
111 };
112}
113
11418µs1;
115
116__END__