• Industrial Automation Engineer (unregistered)

    what happened to the policy: We don't post code of students / hobby projects and kids? that's three strikes in one post. WTF.

  • David-T (unregistered)

    Perl function prototypes are generally best avoided, except in specific circumstances where you want the weird foot-gun effects.

    The documentation tells you to use shift, as that's the idiomatic way of doing it.

  • (author) in reply to Industrial Automation Engineer

    I would argue that the code isn't the WTF- but the circumstances which led to it. Lars is TRWTF.

  • (nodebb)

    The same condition on both branches of OR is probably is a remnant from a previous version - once they were different, but then something changed, and there was the possibility it would change again. Thus OR remains just in case, but neutered. Yes, I'm guilty of the same thing.

  • Maia Everett (github) in reply to Industrial Automation Engineer

    what happened to the policy: We don't post code of students / hobby projects and kids? that's three strikes in one post. WTF.

    From what I understand, the code wasn't written by students. The students were hired later to work on this pre-existing code.

  • (nodebb)

    Not using signatures could be because they were using an old-enough version of Perl that the feature didn't exist then, or was still marked as experimental. Someone who cheaps on hiring decent developers isn't going to spend money on keeping their stack up to date, after all.

  • (nodebb) in reply to Industrial Automation Engineer

    This was code written at a company, not a student project at their school, nor a hobby project. And I'm also not sure that I would consider them to be kids when they are preparing to enter the workforce; they aren't in highschool.

  • (nodebb) in reply to David-T

    Prototypes and signatures are two separate things in Perl. The latter is where function parameters are specified, which is the modern Perl way, rather than using the special @_ variable to get at arguments.

  • David-T (unregistered) in reply to gordonfish

    Oh, ok, apparently Perl has moved on since I... moved on.

  • Oracles (unregistered)
    Comment held for moderation.
  • Duke of New York (unregistered)

    Perl as a whole is generally best avoided. Just look at what it did to gordonfish.

  • master-cycle (unregistered)
    Comment held for moderation.

Leave a comment on “Irritants Make Perls”

Log In or post as a guest

Replying to comment #:

« Return to Article