← 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:12:39 2013

Filename/usr/share/perl5/DateTime/Format/Builder/Parser.pm
StatementsExecuted 563 statements in 5.89ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111658µs868µsDateTime::Format::Builder::Parser::::BEGIN@626DateTime::Format::Builder::Parser::BEGIN@626
1021552µs3.23msDateTime::Format::Builder::Parser::::create_single_parserDateTime::Format::Builder::Parser::create_single_parser
311195µs3.44msDateTime::Format::Builder::Parser::::sort_parsersDateTime::Format::Builder::Parser::sort_parsers
444126µs126µsDateTime::Format::Builder::Parser::::valid_paramsDateTime::Format::Builder::Parser::valid_params
32189µs3.59msDateTime::Format::Builder::Parser::::create_multiple_parsersDateTime::Format::Builder::Parser::create_multiple_parsers
101186µs86µsDateTime::Format::Builder::Parser::::paramsDateTime::Format::Builder::Parser::params
142161µs81µsDateTime::Format::Builder::Parser::::__ANON__[:170]DateTime::Format::Builder::Parser::__ANON__[:170]
101144µs44µsDateTime::Format::Builder::Parser::::params_allDateTime::Format::Builder::Parser::params_all
31142µs3.63msDateTime::Format::Builder::Parser::::create_parserDateTime::Format::Builder::Parser::create_parser
31137µs37µsDateTime::Format::Builder::Parser::::newDateTime::Format::Builder::Parser::new
142135µs35µsDateTime::Format::Builder::Parser::::__ANON__[:171]DateTime::Format::Builder::Parser::__ANON__[:171]
51132µs32µsDateTime::Format::Builder::Parser::::merge_callbacksDateTime::Format::Builder::Parser::merge_callbacks
101130µs30µsDateTime::Format::Builder::Parser::::whose_paramsDateTime::Format::Builder::Parser::whose_params
11123µs88µsDateTime::Format::Builder::Parser::::BEGIN@8DateTime::Format::Builder::Parser::BEGIN@8
141120µs20µsDateTime::Format::Builder::Parser::::CORE:matchDateTime::Format::Builder::Parser::CORE:match (opcode)
11120µs25µsDateTime::Format::Builder::Parser::::BEGIN@2DateTime::Format::Builder::Parser::BEGIN@2
71116µs16µsDateTime::Format::Builder::Parser::::chain_parsersDateTime::Format::Builder::Parser::chain_parsers
31113µs13µsDateTime::Format::Builder::Parser::::set_makerDateTime::Format::Builder::Parser::set_maker
11112µs74µsDateTime::Format::Builder::Parser::::BEGIN@5DateTime::Format::Builder::Parser::BEGIN@5
11111µs51µsDateTime::Format::Builder::Parser::::BEGIN@4DateTime::Format::Builder::Parser::BEGIN@4
1119µs36µsDateTime::Format::Builder::Parser::::BEGIN@3DateTime::Format::Builder::Parser::BEGIN@3
3119µs9µsDateTime::Format::Builder::Parser::::set_parserDateTime::Format::Builder::Parser::set_parser
0000s0sDateTime::Format::Builder::Parser::::__ANON__[:374]DateTime::Format::Builder::Parser::__ANON__[:374]
0000s0sDateTime::Format::Builder::Parser::::__ANON__[:455]DateTime::Format::Builder::Parser::__ANON__[:455]
0000s0sDateTime::Format::Builder::Parser::::__ANON__[:542]DateTime::Format::Builder::Parser::__ANON__[:542]
0000s0sDateTime::Format::Builder::Parser::::create_single_objectDateTime::Format::Builder::Parser::create_single_object
0000s0sDateTime::Format::Builder::Parser::::failDateTime::Format::Builder::Parser::fail
0000s0sDateTime::Format::Builder::Parser::::makerDateTime::Format::Builder::Parser::maker
0000s0sDateTime::Format::Builder::Parser::::no_parserDateTime::Format::Builder::Parser::no_parser
0000s0sDateTime::Format::Builder::Parser::::on_failDateTime::Format::Builder::Parser::on_fail
0000s0sDateTime::Format::Builder::Parser::::parseDateTime::Format::Builder::Parser::parse
0000s0sDateTime::Format::Builder::Parser::::set_failDateTime::Format::Builder::Parser::set_fail
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;
2344µs229µs
# spent 25µs (20+5) within DateTime::Format::Builder::Parser::BEGIN@2 which was called: # once (20µs+5µs) by DateTime::Format::MySQL::BEGIN@11 at line 2
use strict;
# spent 25µs making 1 call to DateTime::Format::Builder::Parser::BEGIN@2 # spent 5µs making 1 call to strict::import
3331µs263µs
# spent 36µs (9+27) within DateTime::Format::Builder::Parser::BEGIN@3 which was called: # once (9µs+27µs) by DateTime::Format::MySQL::BEGIN@11 at line 3
use vars qw( $VERSION );
# spent 36µs making 1 call to DateTime::Format::Builder::Parser::BEGIN@3 # spent 27µs making 1 call to vars::import
4335µs291µs
# spent 51µs (11+40) within DateTime::Format::Builder::Parser::BEGIN@4 which was called: # once (11µs+40µs) by DateTime::Format::MySQL::BEGIN@11 at line 4
use Carp qw( croak );
# spent 51µs making 1 call to DateTime::Format::Builder::Parser::BEGIN@4 # spent 40µs making 1 call to Exporter::import
516µs162µs
# spent 74µs (12+62) within DateTime::Format::Builder::Parser::BEGIN@5 which was called: # once (12µs+62µs) by DateTime::Format::MySQL::BEGIN@11 at line 7
use Params::Validate qw(
# spent 62µs making 1 call to Exporter::import
6 validate SCALAR CODEREF UNDEF ARRAYREF
7228µs174µs);
# spent 74µs making 1 call to DateTime::Format::Builder::Parser::BEGIN@5
832.53ms2153µs
# spent 88µs (23+65) within DateTime::Format::Builder::Parser::BEGIN@8 which was called: # once (23µs+65µs) by DateTime::Format::MySQL::BEGIN@11 at line 8
use Scalar::Util qw( weaken );
# spent 88µs making 1 call to DateTime::Format::Builder::Parser::BEGIN@8 # spent 65µs making 1 call to Exporter::import
9
10=head1 NAME
11
- -
2711µs$VERSION = '0.77';
28
29=head1 CONSTRUCTORS
30
- -
33sub on_fail
34{
35 my ($self, $input, $parent) = @_;
36 my $maker = $self->maker;
37 if ( $maker and $maker->can( 'on_fail' ) ) {
38 $maker->on_fail( $input );
39 } else {
40 croak __PACKAGE__.": Invalid date format: $input";
41 }
42}
43
44sub no_parser
45{
46 croak "No parser set for this parser object.";
47}
48
49sub new
50
# spent 37µs within DateTime::Format::Builder::Parser::new which was called 3 times, avg 12µs/call: # 3 times (37µs+0s) by DateTime::Format::Builder::Parser::create_multiple_parsers at line 394, avg 12µs/call
{
5132µs my $class = shift;
5232µs $class = ref($class)||$class;
5331µs my $i = 0;
54326µs my $self = bless {
55 on_fail => \&on_fail,
56 parser => \&no_parser,
57 }, $class;
58
59315µs return $self;
60}
61
62sub maker { $_[0]->{maker} }
63
64sub set_maker
65
# spent 13µs within DateTime::Format::Builder::Parser::set_maker which was called 3 times, avg 4µs/call: # 3 times (13µs+0s) by DateTime::Format::Builder::Parser::create_multiple_parsers at line 408, avg 4µs/call
{
6632µs my $self = shift;
6732µs my $maker = shift;
68
6933µs $self->{maker} = $maker;
7031µs weaken $self->{maker}
71 if ref $self->{maker};
72
7339µs return $self;
74}
75
76sub fail
77{
78 my ($self, $parent, $input) = @_;
79 $self->{on_fail}->( $self, $input, $parent );
80}
81
82sub parse
83{
84 my ( $self, $parent, $input, @args ) = @_;
85 my $r = $self->{parser}->( $parent, $input, @args );
86 $self->fail( $parent, $input ) unless defined $r;
87 $r;
88}
89
90sub set_parser
91
# spent 9µs within DateTime::Format::Builder::Parser::set_parser which was called 3 times, avg 3µs/call: # 3 times (9µs+0s) by DateTime::Format::Builder::Parser::create_multiple_parsers at line 456, avg 3µs/call
{
9232µs my ($self, $parser) = @_;
9332µs $self->{parser} = $parser;
9439µs $self;
95}
96
97sub set_fail
98{
99 my ($self, $fail) = @_;
100 $self->{on_fail} = $fail;
101 $self;
102}
103
104=head1 METHODS
105
- -
12112µsmy @callbacks = qw( on_match on_fail postprocess preprocess );
122
123{
124
1251500ns=head3 Common parameters
126
- -
164 my %params = (
165 common => {
166 length => {
167 type => SCALAR|ARRAYREF,
168 optional => 1,
169 callbacks => {
1701494µs1420µs
# spent 81µs (61+20) within DateTime::Format::Builder::Parser::__ANON__[/usr/share/perl5/DateTime/Format/Builder/Parser.pm:170] which was called 14 times, avg 6µs/call: # 7 times (35µs+11µs) by Params::Validate::_validate at line 311, avg 6µs/call # 7 times (26µs+10µs) by Params::Validate::_validate at line 333, avg 5µs/call
'is an int' => sub { ref $_[0] ? 1 : $_[0] !~ /\D/ },
# spent 20µs making 14 calls to DateTime::Format::Builder::Parser::CORE:match, avg 1µs/call
1711469µs
# spent 35µs within DateTime::Format::Builder::Parser::__ANON__[/usr/share/perl5/DateTime/Format/Builder/Parser.pm:171] which was called 14 times, avg 3µs/call: # 7 times (18µs+0s) by Params::Validate::_validate at line 311, avg 3µs/call # 7 times (17µs+0s) by Params::Validate::_validate at line 333, avg 2µs/call
'not empty' => sub { ref $_[0] ? @{$_[0]} >= 1 : 1 },
172 }
173 },
174
175 # Stuff used by callbacks
176 label => { type => SCALAR, optional => 1 },
177122µs ( map { $_ => { type => CODEREF|ARRAYREF, optional => 1 } } @callbacks ),
178 },
179 );
180
181=head3 params
182
- -
191 sub params
192
# spent 86µs within DateTime::Format::Builder::Parser::params which was called 10 times, avg 9µs/call: # 10 times (86µs+0s) by DateTime::Format::Builder::Parser::create_single_parser at line 333, avg 9µs/call
{
193105µs my $self = shift;
194104µs my $caller = ref $self || $self;
1951094µs return { map { %$_ } @params{ $caller, 'common' } }
196 }
197
198=head3 params_all
199
- -
2071200ns my $all_params;
208 sub params_all
209
# spent 44µs within DateTime::Format::Builder::Parser::params_all which was called 10 times, avg 4µs/call: # 10 times (44µs+0s) by DateTime::Format::Builder::Parser::create_single_parser at line 311, avg 4µs/call
{
2101031µs return $all_params if defined $all_params;
211114µs my %all_params = map { %$_ } values %params;
212212µs $_->{optional} = 1 for values %all_params;
21315µs $all_params = \%all_params;
214 }
215
216=head3 valid_params
217
- -
2261700ns my %inverse;
227 sub valid_params
228
# spent 126µs within DateTime::Format::Builder::Parser::valid_params which was called 4 times, avg 31µs/call: # once (79µs+0s) by DateTime::Format::Builder::Parser::BEGIN@1 at line 84 of DateTime/Format/Builder/Parser/Dispatch.pm # once (20µs+0s) by DateTime::Format::Builder::Parser::BEGIN@1.6 at line 101 of DateTime/Format/Builder/Parser/Regex.pm # once (14µs+0s) by DateTime::Format::Builder::Parser::BEGIN@1.5 at line 71 of DateTime/Format/Builder/Parser/Quick.pm # once (12µs+0s) by DateTime::Format::Builder::Parser::BEGIN@1.7 at line 35 of DateTime/Format/Builder/Parser/Strptime.pm
{
22945µs my $self = shift;
23049µs my $from = (caller)[0];
23149µs my %args = @_;
23246µs $params{ $from } = \%args;
233466µs for (keys %args)
234 {
235 # %inverse contains keys matching all the
236 # possible params; values are the class if and
237 # only if that class is the only one that uses
238 # the given param.
239814µs $inverse{$_} = exists $inverse{$_} ? undef : $from;
240 }
24143µs undef $all_params;
242431µs 1;
243 }
244
245=head3 whose_params
246
- -
254 sub whose_params
255
# spent 30µs within DateTime::Format::Builder::Parser::whose_params which was called 10 times, avg 3µs/call: # 10 times (30µs+0s) by DateTime::Format::Builder::Parser::create_single_parser at line 323, avg 3µs/call
{
256106µs my $param = shift;
2571035µs return $inverse{$param};
258 }
259}
260
261=head2 Organising and Creating Parsers
262
- -
296sub create_single_object
297{
298 my ( $self ) = shift;
299 my $obj = $self->new;
300 my $parser = $self->create_single_parser( @_ );
301
302 $obj->set_parser( $parser );
303}
304
305sub create_single_parser
306
# spent 3.23ms (552µs+2.68) within DateTime::Format::Builder::Parser::create_single_parser which was called 10 times, avg 323µs/call: # 7 times (423µs+2.03ms) by DateTime::Format::Builder::Parser::sort_parsers at line 501, avg 350µs/call # 3 times (129µs+652µs) by DateTime::Format::Builder::Parser::sort_parsers at line 512, avg 260µs/call
{
307107µs my $class = shift;
308105µs return $_[0] if ref $_[0] eq 'CODE'; # already code
309103µs @_ = %{ $_[0] } if ref $_[0] eq 'HASH'; # turn hashref into hash
310 # ordinary boring sort
31110739µs44955µs my %args = validate( @_, params_all() );
# spent 818µs making 10 calls to Params::Validate::_validate, avg 82µs/call # spent 45µs making 7 calls to DateTime::Format::Builder::Parser::__ANON__[DateTime/Format/Builder/Parser.pm:170], avg 6µs/call # spent 44µs making 10 calls to DateTime::Format::Builder::Parser::params_all, avg 4µs/call # spent 30µs making 10 calls to DateTime::Format::Builder::Parser::Regex::__ANON__[DateTime/Format/Builder/Parser/Regex.pm:84], avg 3µs/call # spent 18µs making 7 calls to DateTime::Format::Builder::Parser::__ANON__[DateTime/Format/Builder/Parser.pm:171], avg 3µs/call
# spent 43µs executing statements in 10 string evals (merged)
312
313 # Determine variables for ease of reference.
3141014µs for (@callbacks)
315 {
3164049µs532µs $args{$_} = $class->merge_callbacks( $args{$_} ) if $args{$_};
# spent 32µs making 5 calls to DateTime::Format::Builder::Parser::merge_callbacks, avg 6µs/call
317 }
318
319 # Determine parser class
320103µs my $from;
3211016µs for ( keys %args )
322 {
3231021µs1030µs $from = whose_params( $_ );
# spent 30µs making 10 calls to DateTime::Format::Builder::Parser::whose_params, avg 3µs/call
324107µs next if (not defined $from) or ($from eq 'common');
325109µs last;
326 }
327102µs croak "Could not identify a parsing module to use." unless $from;
328
329 # Find and call parser creation method
3301079µs1035µs my $method = $from->can( "create_parser" )
# spent 35µs making 10 calls to UNIVERSAL::can, avg 4µs/call
331 or croak "Can't create a $_ parser (no appropriate create_parser method)";
3321027µs my @args = %args;
33310721µs44921µs %args = validate( @args, $from->params() );
# spent 757µs making 10 calls to Params::Validate::_validate, avg 76µs/call # spent 86µs making 10 calls to DateTime::Format::Builder::Parser::params, avg 9µs/call # spent 36µs making 7 calls to DateTime::Format::Builder::Parser::__ANON__[DateTime/Format/Builder/Parser.pm:170], avg 5µs/call # spent 25µs making 10 calls to DateTime::Format::Builder::Parser::Regex::__ANON__[DateTime/Format/Builder/Parser/Regex.pm:84], avg 2µs/call # spent 17µs making 7 calls to DateTime::Format::Builder::Parser::__ANON__[DateTime/Format/Builder/Parser.pm:171], avg 2µs/call
# spent 49µs executing statements in 10 string evals (merged)
3341071µs10876µs $from->$method( %args );
# spent 876µs making 10 calls to DateTime::Format::Builder::Parser::Regex::create_parser, avg 88µs/call
335}
336
337=head3 merge_callbacks
338
- -
344sub merge_callbacks
345
# spent 32µs within DateTime::Format::Builder::Parser::merge_callbacks which was called 5 times, avg 6µs/call: # 5 times (32µs+0s) by DateTime::Format::Builder::Parser::create_single_parser at line 316, avg 6µs/call
{
34654µs my $self = shift;
347
34852µs return unless @_; # No arguments
34952µs return unless $_[0]; # Irrelevant argument
35055µs my @callbacks = @_;
35153µs if (@_ == 1)
352 {
353523µs return $_[0] if ref $_[0] eq 'CODE';
354 @callbacks = @{ $_[0] } if ref $_[0] eq 'ARRAY';
355 }
356 return unless @callbacks;
357
358 for (@callbacks)
359 {
360 croak "All callbacks must be coderefs!" unless ref $_ eq 'CODE';
361 }
362
363 return sub {
364 my $rv;
365 my %args = @_;
366 for my $cb (@callbacks)
367 {
368 $rv = $cb->( %args );
369 return $rv unless $rv;
370 # Ugh. Symbiotic. All but postprocessor return the date.
371 $args{input} = $rv unless $args{parsed};
372 }
373 $rv;
374 };
375}
376
377=head2 create_multiple_parsers
378
- -
389sub create_multiple_parsers
390
# spent 3.59ms (89µs+3.50) within DateTime::Format::Builder::Parser::create_multiple_parsers which was called 3 times, avg 1.20ms/call: # 2 times (48µs+578µs) by DateTime::Format::Builder::Parser::create_parser at line 608, avg 313µs/call # once (41µs+2.92ms) by DateTime::Format::Builder::Parser::create_parser at line 600
{
39132µs my $class = shift;
39233µs my ($options, @specs) = @_;
393
39439µs337µs my $obj = $class->new;
# spent 37µs making 3 calls to DateTime::Format::Builder::Parser::new, avg 12µs/call
395
396 # Organise the specs, and transform them into parsers.
397310µs33.44ms my ($lengths, $others) = $class->sort_parsers( $options, \@specs );
# spent 3.44ms making 3 calls to DateTime::Format::Builder::Parser::sort_parsers, avg 1.15ms/call
398
399 # Merge callbacks if any.
40034µs for ( 'preprocess' ) {
40134µs $options->{$_} = $class->merge_callbacks(
402 $options->{$_}
403 ) if $options->{$_};
404 }
405 # Custom fail method?
40631µs $obj->set_fail( $options->{on_fail} ) if exists $options->{on_fail};
407 # Who's our maker?
40838µs313µs $obj->set_maker( $options->{maker} ) if exists $options->{maker};
# spent 13µs making 3 calls to DateTime::Format::Builder::Parser::set_maker, avg 4µs/call
409
410 # We don't want to save the whole options hash as a closure, since
411 # that can cause a circular reference when $options->{maker} is
412 # set.
41332µs my $preprocess = $options->{preprocess};
414
415 # These are the innards of a multi-parser.
416 my $parser = sub {
417 my ($self, $date, @args) = @_;
418 return unless defined $date;
419
420 # Parameters common to the callbacks. Pre-prepared.
421 my %param = (
422 self => $self,
423 ( @args ? (args => \@args) : () ),
424 );
425
426 my %p;
427 # Preprocess and potentially fill %p
428 if ($preprocess)
429 {
430 $date = $preprocess->(
431 input => $date, parsed => \%p, %param
432 );
433 }
434
435 # Find length parser
436 if (%$lengths)
437 {
438 my $length = length $date;
439 my $parser = $lengths->{$length};
440 if ($parser)
441 {
442 # Found one, call it with _copy_ of %p
443 my $dt = $parser->( $self, $date, { %p }, @args );
444 return $dt if defined $dt;
445 }
446 }
447 # Or calls all others, with _copy_ of %p
448 for my $parser (@$others)
449 {
450 my $dt = $parser->( $self, $date, { %p }, @args );
451 return $dt if defined $dt;
452 }
453 # Failed, return undef.
454 return;
455311µs };
456317µs39µs $obj->set_parser( $parser );
# spent 9µs making 3 calls to DateTime::Format::Builder::Parser::set_parser, avg 3µs/call
457}
458
459=head2 sort_parsers
460
- -
483sub sort_parsers
484
# spent 3.44ms (195µs+3.25) within DateTime::Format::Builder::Parser::sort_parsers which was called 3 times, avg 1.15ms/call: # 3 times (195µs+3.25ms) by DateTime::Format::Builder::Parser::create_multiple_parsers at line 397, avg 1.15ms/call
{
48532µs my $class = shift;
48632µs my ($options, $specs) = @_;
48732µs my (%lengths, @others);
488
48934µs for my $spec (@$specs)
490 {
491 # Put coderefs straight into the 'other' heap.
4921024µs if (ref $spec eq 'CODE')
493 {
494 push @others, $spec;
495 }
496 # Specifications...
497 elsif (ref $spec eq 'HASH')
498 {
4991010µs if (exists $spec->{length})
500 {
501742µs72.45ms my $code = $class->create_single_parser( %$spec );
# spent 2.45ms making 7 calls to DateTime::Format::Builder::Parser::create_single_parser, avg 350µs/call
502 my @lengths = ref $spec->{length}
503711µs ? @{ $spec->{length} }
504 : ( $spec->{length} );
505710µs for my $length ( @lengths )
506 {
507721µs push @{ $lengths{$length} }, $code;
508 }
509 }
510 else
511 {
512312µs3780µs push @others, $class->create_single_parser( %$spec );
# spent 780µs making 3 calls to DateTime::Format::Builder::Parser::create_single_parser, avg 260µs/call
513 }
514 }
515 # Something else
516 else
517 {
518 croak "Invalid specification in list.";
519 }
520 }
521
522328µs716µs while (my ($length, $parsers) = each %lengths)
# spent 16µs making 7 calls to DateTime::Format::Builder::Parser::chain_parsers, avg 2µs/call
523 {
524 $lengths{$length} = $class->chain_parsers( $parsers );
525 }
526
527311µs return ( \%lengths, \@others );
528}
529
530sub chain_parsers
531
# spent 16µs within DateTime::Format::Builder::Parser::chain_parsers which was called 7 times, avg 2µs/call: # 7 times (16µs+0s) by DateTime::Format::Builder::Parser::sort_parsers at line 522, avg 2µs/call
{
53274µs my ($self, $parsers) = @_;
533720µs return $parsers->[0] if @$parsers == 1;
534 return sub {
535 my $self = shift;
536 for my $parser (@$parsers)
537 {
538 my $rv = $self->$parser( @_ );
539 return $rv if defined $rv;
540 }
541 return undef;
542 };
543}
544
545=head2 create_parser
546
- -
582sub create_parser
583
# spent 3.63ms (42µs+3.59) within DateTime::Format::Builder::Parser::create_parser which was called 3 times, avg 1.21ms/call: # 3 times (42µs+3.59ms) by DateTime::Format::Builder::create_parser at line 156 of DateTime/Format/Builder.pm, avg 1.21ms/call
{
58432µs my $class = shift;
58532µs if (not ref $_[0])
586 {
587 # Simple case of single specification as a hash
588 return $class->create_single_object( @_ )
589 }
590
591 # Let's see if we were given an options block
5923900ns my %options;
59333µs while ( ref $_[0] eq 'ARRAY' )
594 {
59532µs my $options = shift;
59639µs %options = ( %options, @$options );
597 }
598
599 # Now, can we create a multi-parser out of the remaining arguments?
600311µs12.96ms if (ref $_[0] eq 'HASH' or ref $_[0] eq 'CODE')
601 {
602 return $class->create_multiple_parsers( \%options, @_ );
603 }
604 else
605 {
606 # If it wasn't a HASH or CODE, then it was (ideally)
607 # a list of pairs describing a single specification.
608211µs2625µs return $class->create_multiple_parsers( \%options, { @_ } );
# spent 625µs making 2 calls to DateTime::Format::Builder::Parser::create_multiple_parsers, avg 313µs/call
609 }
610}
611
612=head1 FINDING IMPLEMENTATIONS
613
- -
624# Find all our workers
625{
6264188µs2880µs
# spent 868µs (658+209) within DateTime::Format::Builder::Parser::BEGIN@626 which was called: # once (658µs+209µs) by DateTime::Format::MySQL::BEGIN@11 at line 626
use Class::Factory::Util;
# spent 868µs making 1 call to DateTime::Format::Builder::Parser::BEGIN@626 # spent 12µs making 1 call to Class::Factory::Util::import
627
62817µs1358µs foreach my $worker ( __PACKAGE__->subclasses )
# spent 358µs making 1 call to Class::Factory::Util::_subclasses
629 {
6305249µs eval "use DateTime::Format::Builder::Parser::$worker;";
# spent 182µs executing statements in string eval
# includes 811µs spent executing 1 call to 1 sub defined therein. # spent 116µs executing statements in string eval
# includes 460µs spent executing 1 call to 1 sub defined therein. # spent 116µs executing statements in string eval
# includes 486µs spent executing 1 call to 1 sub defined therein. # spent 114µs executing statements in string eval
# includes 437µs spent executing 1 call to 1 sub defined therein. # spent 14µs executing statements in string eval
# includes 16µs spent executing 1 call to 1 sub defined therein.
63155µs die $@ if $@;
632 }
633}
634
635123µs1;
636
637__END__
 
# spent 20µs within DateTime::Format::Builder::Parser::CORE:match which was called 14 times, avg 1µs/call: # 14 times (20µs+0s) by DateTime::Format::Builder::Parser::__ANON__[/usr/share/perl5/DateTime/Format/Builder/Parser.pm:170] at line 170, avg 1µs/call
sub DateTime::Format::Builder::Parser::CORE:match; # opcode