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   618 use strict;
  49         94  
  49         4863  
4 49     49   262 use warnings;
  49         93  
  49         3550  
5              
6             our $VERSION = '1.66';
7              
8 49     49   362 use Scalar::Util ();
  49         213  
  49         7461  
9              
10             ## no critic (Subroutines::ProhibitBuiltinHomonyms)
11             sub can {
12 36018     36018 0 59660 my $object = shift;
13 36018         60670 my $method = shift;
14              
15 36018 100       67373 return unless Scalar::Util::blessed($object);
16 36005         155429 return $object->can($method);
17             }
18              
19             sub isa {
20 31951     31951 0 61700 my $object = shift;
21 31951         67261 my $method = shift;
22              
23 31951 100       81269 return unless Scalar::Util::blessed($object);
24 31948         181086 return $object->isa($method);
25             }
26              
27             1;