Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • You might not have noticed the big section in the change log labelled "BACKWARDS INCOMPATIBILITIES". And this change occurred back in 0.17. Unfortunately, the previous behavior when subtracting one datetime from another was broken. It _claimed_ to be returning the absolute difference between two datetimes, but it wasn't, because days are of varying lengths. In fact, the absolute difference between two datetimes can only be expressed in seconds + nanoseconds.

    So while I'm all for backwards compatibility, I'm not going to leave such important functionality broken, nor am I going to document it as returning "days + seconds + nanoseconds, which is sort of the absolute difference, but not quite, because of leapseconds, but it did this historically, so this useless behavior will stay until the end of time".
    • the big section in the change log labelled BACKWARDS INCOMPATIBILITIES

      Mine are even more explicit. Here's one from WWW::Mechanize []:

      0.62    October 7, 2003  8:46pm
              * The parms for find_link()'s url_regex and text_regex must now
                be actual regex objects, as in qr// objects.  They can't just
                be little text strings.  If this is



    • The problem is that I'm not interested in the number of seconds, but the actual days. I understand that in some cases days are slightly longer/shorter, but in terms of actual days, how long a day is immaterial for my uses.

      It has been really annoying because it now means if anyone updates DateTime and is using my module, or any other module that relies on delta_days(), the code now breaks disastrously. It would have been better to leave the function as is, and create another function along the lines of del