| File | /usr/local/lib/perl5/site_perl/5.10.1/darwin-2level/DateTime/Helpers.pm |
| Statements Executed | 27 |
| Statement Execution Time | 182µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 4 | 2 | 1 | 31µs | 38µs | DateTime::Helpers::can |
| 1 | 1 | 1 | 14µs | 16µs | DateTime::Helpers::BEGIN@3 |
| 1 | 1 | 1 | 6µs | 15µs | DateTime::Helpers::BEGIN@4 |
| 1 | 1 | 1 | 3µs | 3µs | DateTime::Helpers::BEGIN@8 |
| 0 | 0 | 0 | 0s | 0s | DateTime::Helpers::isa |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package DateTime::Helpers; | ||||
| 2 | |||||
| 3 | 3 | 20µs | 2 | 19µs | # spent 16µs (14+3) within DateTime::Helpers::BEGIN@3 which was called
# once (14µs+3µs) by DateTime::BEGIN@9 at line 3 # spent 16µs making 1 call to DateTime::Helpers::BEGIN@3
# spent 3µs making 1 call to strict::import |
| 4 | 3 | 27µs | 2 | 23µs | # spent 15µs (6+8) within DateTime::Helpers::BEGIN@4 which was called
# once (6µs+8µs) by DateTime::BEGIN@9 at line 4 # spent 15µs making 1 call to DateTime::Helpers::BEGIN@4
# spent 8µs making 1 call to warnings::import |
| 5 | |||||
| 6 | 1 | 600ns | our $VERSION = '0.55'; | ||
| 7 | |||||
| 8 | 3 | 91µs | 1 | 3µs | # spent 3µs within DateTime::Helpers::BEGIN@8 which was called
# once (3µs+0s) by DateTime::BEGIN@9 at line 8 # spent 3µs making 1 call to DateTime::Helpers::BEGIN@8 |
| 9 | |||||
| 10 | # spent 38µs (31+7) within DateTime::Helpers::can which was called 4 times, avg 10µs/call:
# 2 times (23µs+4µs) by DateTime::_compare at line 1791 of DateTime.pm, avg 14µs/call
# 2 times (8µs+3µs) by DateTime::_compare at line 1800 of DateTime.pm, avg 6µs/call | ||||
| 11 | 16 | 40µs | my $object = shift; | ||
| 12 | my $method = shift; | ||||
| 13 | |||||
| 14 | return unless Scalar::Util::blessed($object); # spent 3µs making 4 calls to Scalar::Util::blessed, avg 700ns/call | ||||
| 15 | return $object->can($method); # spent 4µs making 4 calls to UNIVERSAL::can, avg 1µs/call | ||||
| 16 | } | ||||
| 17 | |||||
| 18 | sub isa { | ||||
| 19 | my $object = shift; | ||||
| 20 | my $method = shift; | ||||
| 21 | |||||
| 22 | return unless Scalar::Util::blessed($object); | ||||
| 23 | return $object->isa($method); | ||||
| 24 | } | ||||
| 25 | |||||
| 26 | 1 | 3µs | 1; | ||
| 27 | |||||
| 28 | __END__ | ||||
| 29 | |||||
| 30 | =head1 NAME | ||||
| 31 | |||||
| 32 | DateTime::Helpers - Helper functions for other DateTime modules | ||||
| 33 | |||||
| 34 | =head1 AUTHOR | ||||
| 35 | |||||
| 36 | Dave Rolsky <autarch@urth.org> | ||||
| 37 | |||||
| 38 | However, please see the CREDITS file for more details on who I really | ||||
| 39 | stole all the code from. | ||||
| 40 | |||||
| 41 | =head1 COPYRIGHT | ||||
| 42 | |||||
| 43 | Copyright (c) 2003-2010 David Rolsky. All rights reserved. This | ||||
| 44 | program is free software; you can redistribute it and/or modify it | ||||
| 45 | under the same terms as Perl itself. | ||||
| 46 | |||||
| 47 | =cut |