← Index
NYTProf Performance Profile   « line view »
For svc/members/upsert
  Run on Tue Jan 13 11:50:22 2015
Reported on Tue Jan 13 12:09:49 2015

Filename/usr/share/perl5/DateTime/Format/Builder/Parser/Quick.pm
StatementsExecuted 14 statements in 309µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11112µs22µsDateTime::Format::Builder::Parser::Quick::::BEGIN@5DateTime::Format::Builder::Parser::Quick::BEGIN@5
1119µs76µsDateTime::Format::Builder::Parser::Quick::::BEGIN@9DateTime::Format::Builder::Parser::Quick::BEGIN@9
1117µs14µsDateTime::Format::Builder::Parser::Quick::::BEGIN@6DateTime::Format::Builder::Parser::Quick::BEGIN@6
1117µs41µsDateTime::Format::Builder::Parser::Quick::::BEGIN@8DateTime::Format::Builder::Parser::Quick::BEGIN@8
1116µs24µsDateTime::Format::Builder::Parser::Quick::::BEGIN@7DateTime::Format::Builder::Parser::Quick::BEGIN@7
0000s0sDateTime::Format::Builder::Parser::Quick::::__ANON__[:19]DateTime::Format::Builder::Parser::Quick::__ANON__[:19]
0000s0sDateTime::Format::Builder::Parser::Quick::::__ANON__[:42]DateTime::Format::Builder::Parser::Quick::__ANON__[:42]
0000s0sDateTime::Format::Builder::Parser::Quick::::create_parserDateTime::Format::Builder::Parser::Quick::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::Quick;
2{
32700ns $DateTime::Format::Builder::Parser::Quick::VERSION = '0.81';
4}
5222µs232µs
# spent 22µs (12+10) within DateTime::Format::Builder::Parser::Quick::BEGIN@5 which was called: # once (12µs+10µs) by DateTime::Format::Builder::Parser::BEGIN@1.1 at line 5
use strict;
# spent 22µs making 1 call to DateTime::Format::Builder::Parser::Quick::BEGIN@5 # spent 10µs making 1 call to strict::import
6221µs220µs
# spent 14µs (7+6) within DateTime::Format::Builder::Parser::Quick::BEGIN@6 which was called: # once (7µs+6µs) by DateTime::Format::Builder::Parser::BEGIN@1.1 at line 6
use warnings;
# spent 14µs making 1 call to DateTime::Format::Builder::Parser::Quick::BEGIN@6 # spent 6µs making 1 call to warnings::import
7223µs241µs
# spent 24µs (6+18) within DateTime::Format::Builder::Parser::Quick::BEGIN@7 which was called: # once (6µs+18µs) by DateTime::Format::Builder::Parser::BEGIN@1.1 at line 7
use vars qw( %dispatch_data );
# spent 24µs making 1 call to DateTime::Format::Builder::Parser::Quick::BEGIN@7 # spent 18µs making 1 call to vars::import
8223µs275µs
# spent 41µs (7+34) within DateTime::Format::Builder::Parser::Quick::BEGIN@8 which was called: # once (7µs+34µs) by DateTime::Format::Builder::Parser::BEGIN@1.1 at line 8
use Params::Validate qw( SCALAR OBJECT CODEREF validate );
# spent 41µs making 1 call to DateTime::Format::Builder::Parser::Quick::BEGIN@8 # spent 34µs making 1 call to Exporter::import
92207µs2143µs
# spent 76µs (9+67) within DateTime::Format::Builder::Parser::Quick::BEGIN@9 which was called: # once (9µs+67µs) by DateTime::Format::Builder::Parser::BEGIN@1.1 at line 9
use base qw( DateTime::Format::Builder::Parser );
# spent 76µs making 1 call to DateTime::Format::Builder::Parser::Quick::BEGIN@9 # spent 67µs making 1 call to base::import
10
- -
13__PACKAGE__->valid_params(
14 Quick => {
15 type => SCALAR | OBJECT,
16 callbacks => {
17 good_classname => sub {
18 ( ref $_[0] ) or ( $_[0] =~ /^\w+[:'\w+]*\w+/ );
19 },
20 }
21 },
2218µs18µs method => {
# spent 8µs making 1 call to DateTime::Format::Builder::Parser::valid_params
23 optional => 1,
24 type => SCALAR | CODEREF,
25 },
26);
27
28sub create_parser {
29 my ( $self, %args ) = @_;
30 my $class = $args{Quick};
31 my $method = $args{method};
32 $method = 'parse_datetime' unless defined $method;
33 eval "use $class";
34 die $@ if $@;
35
36 return sub {
37 my ( $self, $date ) = @_;
38 return unless defined $date;
39 my $rv = eval { $class->$method($date) };
40 return $rv if defined $rv;
41 return;
42 };
43}
44
4513µs1;
46
47# ABSTRACT: Use another formatter, simply
48
49__END__