Firstly, thank you for pointing me to the delta documentation. The target module purpose is to calculate date/time differences
#1 how does the difference manifest itself Original in 5.10.0 (I added the line that says "comparing..." 1..60 ok 1 - use xxx::DateDelta; # # comapring 4.000000 to 4.000000 at 0 func=seconds prec= type= field=s +econds ok 2 - seconds() (with time) # comapring 4 to 4 at 1 func=seconds prec=trunc type= field=seconds ok 3 - seconds(trunc) (with time) # comapring 34298704.000000 to 34298704.000000 at 2 func=total_seconds + prec= type=total_ field=seconds ... 1..60 ok 1 - use AMG::DateDelta; # # comapring 4.000000 to 4.000000 at 0 func=seconds prec= type= field=s +econds ok 2 - seconds() (with time) # comapring 4 to 4 at 1 func=seconds prec=trunc type= field=seconds ok 3 - seconds(trunc) (with time) # comapring 34298704.000000 to 34298704.000000 at 2 func=total_seconds + prec= type=total_ field=seconds ok 4 - total_seconds() (with time) # comapring 34298704 to 34298704 at 3 func=total_seconds prec=trunc ty +pe=total_ field=seconds ok 5 - total_seconds(trunc) (with time) # comapring 25.066667 to 25.066667 at 4 func=minutes prec= type= field +=minutes
But when I run on 538.2 I get
t/test.t .. 1/60 # # comapring 4.000000 to 4.000000 at 0 func=seconds prec= type= field=s +econds # comapring 4 to 4 at 1 func=seconds prec=trunc type= field=seconds ... # comapring 571645.066667 to 571645.066667 at 6 func=total_minutes pre +c= type=total_ field=minutes # 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= ty +pe=total_ field=hours /\/\/\/
creating the class:
use Class::MethodMaker new_with_init => 'new', get_set => [ qw ( _delta_date _delta_time )], boolean => [ qw ( _use_time_flag ) ]
and the function for hours looks like:
sub hours { my $self = shift; my $name = (caller(0))[3]; return $self->_format_time((defined($_[0]) && $_[0] eq 'trunc') ? '%hv' : '%hd') }

In reply to Re^2: Overcoming 5.10.0 vs 5.38.2 incompatibilities by zatlas1
in thread Overcoming 5.10.0 vs 5.38.2 incompatibilities by zatlas1

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.