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

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

  (email not shown publicly)
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Wednesday November 02, 2005
06:30 PM

Grumble, *** frickin' versions ***, grumble

[ #27420 ]

OK. That's enough. On more than one large project I've been bitten by having bad version numbers of modules. I'm going to write tests for my code which automatically loads up a bunch of modules and then validates the version numbers of everything in @INC which I can load :/

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 use the following test in all of my modules. It checks that all modules and scripts have the same version number. In conjunction with a Perl::Critic test that ensures every file has a $VERSION, it's nearly foolproof.

    #!perl -w
    use warnings;
    use strict;
    use File::Find;
    use File::Slurp;
    use Test::More qw(no_plan);

    my $last_version = undef;

    sub check {
          return if (! m{blib/script/}xms && ! m{\.pm \z}xms);

          my $content = read_file($_);

          # only look