Stories
Slash Boxes
Comments
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.
 Full
 Abbreviated
 Hidden
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,
    • the big section in the change log labelled BACKWARDS INCOMPATIBILITIES

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

      0.62    October 7, 2003  8:46pm
              [THINGS THAT MIGHT BREAK YOUR CODE]
              * 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

      --

      --
      xoa

    • 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

  • Hey, I know, instead of whining in a journal entry you could send me a useful bug report. That might be a little less satisfying, but it would of course have the effect of leading to a fix.

    I can't reproduce whatever bug you think you've found. I did this:


    print DateTime->new(day=>6,month=>11,year=>2003)->datetime;


    and it works fine.
    • Hey, I know, instead of whining in a journal entry you could send me a useful bug report. That might be a little less satisfying, but it would of course have the effect of leading to a fix.

      Sad to think that people might be satisfied with complaining than with solving the problem.

      --

      --
      xoa

      • Patches for humanity welcome. (Not that I have the maintainer's e-mail address :)

        • Another dig. I really am disappointed they had to come from three people who contributions I actually respected.

          Does it really come down to the level of slashdot comments?

          • I certainly didn't mean to hurt your feelings and I apologize.

            Bug reports for this module are between you and Dave; I have no stake in the matter. I'm just trying to be witty. Sometimes it doesn't work for the intended audience, and that's fine.

      • Sad to think that the put downs are coming thick and fast despite sending a bug report BEFORE I posted my Journal. AND trying to write a set of test cases.

        If my contributions are so lowly thought of I'll not bother to help in future.

        • Sad to think that people might be satisfied with complaining than with solving the problem.

          Sorry, let me rephrases: "Sad to think that could be an expectation." I didn't mean it as a putdown.

          --

          --
          xoa

    • Hey, you know, instead of berating me, why not check your rt.cpan.org entry. Okay I now know WHY it fails, but at least I took the time write a test case to show why I thought it was wrong.

      I have no idea why a month of 11 is failing but it is. I was testing it on Windows so it may be some perculiarity there. I will look more in depth tomorrow.

      Whining is for someone who can't be arsed to try and help fix things. You have me mistaken for someone else. If you would like me to take the time in future to try

      • And I responded to your original bug report as soon as I saw it. From the bug report, I thought you were simply saying that the _new_ delta_days method in 0.18 didn't work as expected, as opposed to saying that the duration object returned by subtraction now had different values.

        A month of 11 being a problem mystifies me, since it works fine for me. I'm not sure why it'd be a problem on Windows. But you certainly didn't mention that in the RT report, or I would have responded to it.

        As to the infinite t
        • I can appreciate there may have been discussion of the datetime list, and had I been subscribed I would certainly have pointed out the fact, that despite it being not entriely accurate, others may rely on the fact that it returned a value that represented the total number of days as opposed to a difference between the month days. Improving the function is one thing, to change it's reason for existing is another.

          The infinite issue is not something I've had time to look into. My first assumption was that so

  • If you're using a 0.x module you need to be extra careful about what's going on while the authors adjust their API. If authors can't twiddle the API while in 0.x, when can they? I've been using DateTime in production since version 0.03. More than once I've had to change my code because DateTime's API was tweaked, but to me it's well worth it because it's a great module, and because the authors are very reponsive and the changes well documented. Following the datetime dev list helps too, and that's where I l
    • If you're using a 0.x module you need to be extra careful about what's going on while the authors adjust their API.

      A fair point.

      Seeing as I was testing against the current version that installed on Windows and the same version on my Linux box, I wasn't aware of the change. I will try to be a bit more careful in future.