user-pic

Grinnz

Subscribe to feed Recent Actions from Grinnz

  • davebaker commented on Can't post a comment here -- dunno why

    Thanks, Aristotle!

    It works (using the browser's back button to return to the original page, then using the Submit button underneath the Leave a Comment field).

    Signing out and clearing cookies before logging back in didn't solve the problem (I still got a "your session has expired" when using the Submit button on the preview page).

  • Tom Metro commented on A Date with CPAN, Update #3: Golden Jubilee

    >hardcoding test results has other problems

    We always coach developers to use hard coded test data to the extent practical. When writing tests you have to unlearn a lot of DRY principles. We tolerate a lot more repetition, and factor it out sparingly.

    There are two main reasons why you do this:
    1. Any bit of clever calculation in your test could could be wrong. Hard coded values are easy to hand verify.
    2. Your test should read like an example of how to use your API, and having lots of layers of indirection and data generators makes the code less readable.

  • Buddy Burden commented on A Date with CPAN, Update #3: Golden Jubilee

    > A variant similar to what you added is coming to a future version of Time::Local. PR#15

    It looks like it's there already! I'm looking forward to converting over to using these new functions: timegm_posix and timelocal_posix. Should make my job much easier. :-)

  • Buddy Burden commented on A Date with CPAN, Update #3: Golden Jubilee

    > We always coach developers to use hard coded test data to the extent practical. When writing tests you have to unlearn a lot of DRY principles. ...

    What you're suggesting can be good advice—I certainly agree that repeating yourself in unit tests is often preferable to being too clever in them, for instance—but I don't believe it is always good advice. Unfortunately, I think a proper response is beyond a comment here; perhaps I'll compose a larger blog post on this very topic in order to discuss the pros and cons.

    > Are you not able to explicitly set envir…

  • Diab Jerius commented on Preallocating scalars

    And there's also Acme::SvGrow from back in the day, which uses either Data::Peek::DGrow, or the `push( '.' . $length)` approach.

Subscribe to feed Responses to Comments from Grinnz

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a design donated by Six Apart, Ltd.