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   772 use strict;
  49         135  
  49         1449  
4 49     49   238 use warnings;
  49         101  
  49         1877  
5              
6             our $VERSION = '1.62';
7              
8 49     49   339 use Scalar::Util ();
  49         153  
  49         6273  
9              
10             ## no critic (Subroutines::ProhibitBuiltinHomonyms)
11             sub can {
12 36042     36042 0 41641 my $object = shift;
13 36042         38031 my $method = shift;
14              
15 36042 100       66982 return unless Scalar::Util::blessed($object);
16 36029         114960 return $object->can($method);
17             }
18              
19             sub isa {
20 31990     31990 0 41535 my $object = shift;
21 31990         39003 my $method = shift;
22              
23 31990 100       98219 return unless Scalar::Util::blessed($object);
24 31987         130635 return $object->isa($method);
25             }
26              
27             1;