I do not see in the code where Date::Manip methods are used #### for my $delta ($delta_time, $delta_date){ # the above are likely to be Date::Manip[::*] objects - which ones???? for my $field (qw (seconds minutes hours days months years)) { for my $type ('','total_') { my $func = "${type}${field}"; # this is the method name to be called via the $delta objects for my $prec ('','trunc') { # this is the a parameter to above method, one is empty one is 'trunc' diag ("comapring ".$delta->$func($prec)." to ".$test_values[$test_index]." at ".$test_index." func=".$func." prec=".$prec." type=".$type." field=".$field); ok($delta->$func($prec) == $test_values[$test_index++],"$func($prec) ($delta_text[$delta_index])") # it calls e.g. this: $delta->total_seconds('trunc') # and it compares the returned result with an item from an array # of expected results $test_values[$test_index] #### # comapring 571645.000000 to 571645 at 7 func=total_minutes prec=trunc type=total_ field=minutes # comapring 9527.417778 to 23.417778 at 8 func=hours prec= type= field=hours # Failed test 'hours() (with time)' # at t/test.t line 97. # Expected 23 got 9527.417778 # comapring 9527 to 23 at 9 func=hours prec=trunc type= field=hours # Failed test 'hours(trunc) (with time)' # at t/test.t line 97. # Expected 9527.417778 got 9527 # comapring 9527.417778 to 9527.417778 at 10 func=total_hours prec= type=total_ field=hours