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.
  • I don't put that in mine, but I probably should. Not because I use 5.8-specific features, but because I haven't tested it on anything lower. It's not sufficient to put that in the Makefile.PL, because you don't always make on the same machine as you use.
    • The CPAN testers would soon tell you if it didn't work on 5.8 :)

      I can see it might make a difference if you make on a 5.6 (or other) machine, but in the long run it helps the user if it bombs before getting any further than 'perl Makefile.PL'.

      • Well, as you've noticed by now, this is probably from people running h2xs blindly using the generated module stub. As for the "CPAN testers" idea, I would be mortified if I uploaded a CPAN module and it failed tests. I gots me a reputation to maintain :)

        • A fair point.

          Perhaps mailing the cpan-testers list or the code review list (which has gone quiet these days) with a request to test on other Perls and/or other boxes might be an idea, then sending test reports to the author only. I have certainly attempted it when asked, and similar requests in the past seem to have been met with favourable responses from others. Providing it didn't get overwhelmed of course.

          In the end it comes down to knowing what's out there and how to use it. Whether thats h2xs, the

  • When 5.6.x came out, some people put:

    use 5.6.0;

    in their Makefiles/module, again often for no reason. I think that the "our" keyword was often the only valid reason why they specified 5.6.x, and that's often avoidable.

    I know my modules have only been tested with a limited subset of Perl versions, I say use 5.006; because I do use "our" and I don't have any older Perls to test it with. I think things have moved on enough for me to say this, but accept patches, whereas use 5.008; by default seems a littl

    -- "It's not magic, it's work..."
    • Its been a while since I looked into creating a CPAN module so I can't recall the recommended way to do it. I think if use use h2xs it automatically inserts a use for the version of perl you happen to be using.
      • Drat, just checked and you're right :(

        IMO it would have been nicer if there was a commandline option that allowed you to specify a specific version, rather than always assuming the current version onwards. I haven't used h2xs in a very long time, so never realised it did that.

        Oh well, at least I know why now.

        • there is a -b option iirc, just authors don't use it.

          I would sooner remove the version line and wait for cpan-testers to notify if it fails on a particular version or platform.

          I try not to use non perl 5.5 syntax in any CPAN code. Writing for CPAN is different to writing work projects where you know what modules will be installed and which version.

          This is why releasing work code to CPAN is nontrivial - first you have to check its not going to lose your employer (or yourself) competitive advantage, the


          @JAPH = qw(Hacker Perl Another Just);
          print reverse @JAPH;