File Coverage

blib/lib/DateTime/Helpers.pm
Criterion Covered Total %
statement 17 17 100.0
branch 4 4 100.0
condition n/a
subroutine 5 5 100.0
pod 0 2 0.0
total 26 28 92.8


line stmt bran cond sub pod time code
1             package DateTime::Helpers;
2              
3 49     49   773 use strict;
  49         137  
  49         1419  
4 49     49   267 use warnings;
  49         122  
  49         1855  
5              
6             our $VERSION = '1.61';
7              
8 49     49   313 use Scalar::Util ();
  49         136  
  49         6713  
9              
10             ## no critic (Subroutines::ProhibitBuiltinHomonyms)
11             sub can {
12 36042     36042 0 48595 my $object = shift;
13 36042         44235 my $method = shift;
14              
15 36042 100       77753 return unless Scalar::Util::blessed($object);
16 36029         130283 return $object->can($method);
17             }
18              
19             sub isa {
20 31990     31990 0 50287 my $object = shift;
21 31990         49701 my $method = shift;
22              
23 31990 100       111201 return unless Scalar::Util::blessed($object);
24 31987         151041 return $object->isa($method);
25             }
26              
27             1;