Filename | /usr/lib/x86_64-linux-gnu/perl5/5.20/DateTime/Helpers.pm |
Statements | Executed 8 statements in 130µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 12µs | 22µs | BEGIN@3 | DateTime::Helpers::
1 | 1 | 1 | 6µs | 10µs | BEGIN@4 | DateTime::Helpers::
1 | 1 | 1 | 3µs | 3µs | BEGIN@6 | DateTime::Helpers::
0 | 0 | 0 | 0s | 0s | can | DateTime::Helpers::
0 | 0 | 0 | 0s | 0s | isa | DateTime::Helpers::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package DateTime::Helpers; | ||||
2 | 1 | 400ns | $DateTime::Helpers::VERSION = '1.12'; | ||
3 | 2 | 20µs | 2 | 32µs | # spent 22µs (12+10) within DateTime::Helpers::BEGIN@3 which was called:
# once (12µs+10µs) by DateTime::Duration::BEGIN@8 at line 3 # spent 22µs making 1 call to DateTime::Helpers::BEGIN@3
# spent 10µs making 1 call to strict::import |
4 | 2 | 22µs | 2 | 13µs | # spent 10µs (6+4) within DateTime::Helpers::BEGIN@4 which was called:
# once (6µs+4µs) by DateTime::Duration::BEGIN@8 at line 4 # spent 10µs making 1 call to DateTime::Helpers::BEGIN@4
# spent 4µs making 1 call to warnings::import |
5 | |||||
6 | 2 | 85µs | 1 | 3µs | # spent 3µs within DateTime::Helpers::BEGIN@6 which was called:
# once (3µs+0s) by DateTime::Duration::BEGIN@8 at line 6 # spent 3µs making 1 call to DateTime::Helpers::BEGIN@6 |
7 | |||||
8 | sub can { | ||||
9 | my $object = shift; | ||||
10 | my $method = shift; | ||||
11 | |||||
12 | return unless Scalar::Util::blessed($object); | ||||
13 | return $object->can($method); | ||||
14 | } | ||||
15 | |||||
16 | sub isa { | ||||
17 | my $object = shift; | ||||
18 | my $method = shift; | ||||
19 | |||||
20 | return unless Scalar::Util::blessed($object); | ||||
21 | return $object->isa($method); | ||||
22 | } | ||||
23 | |||||
24 | 1 | 2µs | 1; |