← 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:55 2013

Filename/usr/share/perl5/DateTime/Format/Builder/Parser/Dispatch.pm
StatementsExecuted 21 statements in 413µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11122µs26µsDateTime::Format::Builder::Parser::Dispatch::::BEGIN@2DateTime::Format::Builder::Parser::Dispatch::BEGIN@2
11120µs24µsDateTime::Format::Builder::Parser::Dispatch::::BEGIN@5DateTime::Format::Builder::Parser::Dispatch::BEGIN@5
11116µs62µsDateTime::Format::Builder::Parser::Dispatch::::BEGIN@4DateTime::Format::Builder::Parser::Dispatch::BEGIN@4
11112µs53µsDateTime::Format::Builder::Parser::Dispatch::::BEGIN@3DateTime::Format::Builder::Parser::Dispatch::BEGIN@3
11110µs23µ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;
2336µs231µs
# spent 26µs (22+4) within DateTime::Format::Builder::Parser::Dispatch::BEGIN@2 which was called: # once (22µs+4µs) by DateTime::Format::Builder::Parser::BEGIN@1 at line 2
use strict;
# spent 26µs making 1 call to DateTime::Format::Builder::Parser::Dispatch::BEGIN@2 # spent 4µs making 1 call to strict::import
3336µs295µs
# spent 53µs (12+41) within DateTime::Format::Builder::Parser::Dispatch::BEGIN@3 which was called: # once (12µs+41µs) by DateTime::Format::Builder::Parser::BEGIN@1 at line 3
use vars qw( $VERSION %dispatch_data );
# spent 53µs making 1 call to DateTime::Format::Builder::Parser::Dispatch::BEGIN@3 # spent 41µs making 1 call to vars::import
4337µs2108µs
# spent 62µs (16+46) within DateTime::Format::Builder::Parser::Dispatch::BEGIN@4 which was called: # once (16µs+46µs) by DateTime::Format::Builder::Parser::BEGIN@1 at line 4
use Params::Validate qw( CODEREF validate );
# spent 62µs making 1 call to DateTime::Format::Builder::Parser::Dispatch::BEGIN@4 # spent 46µs making 1 call to Exporter::import
5368µs227µs
# spent 24µs (20+3) within DateTime::Format::Builder::Parser::Dispatch::BEGIN@5 which was called: # once (20µs+3µs) by DateTime::Format::Builder::Parser::BEGIN@1 at line 5
use DateTime::Format::Builder::Parser;
# spent 24µs making 1 call to DateTime::Format::Builder::Parser::Dispatch::BEGIN@5 # spent 3µs making 1 call to UNIVERSAL::import
6
7=head1 NAME
8
- -
7512µs$VERSION = '0.78';
76
77{
784216µs237µs
# spent 23µs (10+14) within DateTime::Format::Builder::Parser::Dispatch::BEGIN@78 which was called: # once (10µs+14µs) by DateTime::Format::Builder::Parser::BEGIN@1 at line 78
no strict 'refs';
# spent 23µs making 1 call to DateTime::Format::Builder::Parser::Dispatch::BEGIN@78 # spent 14µs making 1 call to strict::unimport
7924µs *dispatch_data = *DateTime::Format::Builder::dispatch_data;
80 *params = *DateTime::Format::Builder::Parser::params;
81}
82
83DateTime::Format::Builder::Parser->valid_params(
8418µs179µs Dispatch => {
# spent 79µ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
11416µs1;
115
116__END__