Courage has asked for the wisdom of the Perl Monks concerning the following question:

... when I come to that place and opened appropriate README file it says that it's version 0.01, whereas filename says it's version is 0.03.

Nothing of great importance, but this smells somewhat fishy.

Best wishes!

  • Comment on CPAN nodelet contains Compress-SelfExtracting-0.03 ...

Replies are listed 'Best First'.
Re: CPAN nodelet contains Compress-SelfExtracting-0.03 ...
by jmcnamara (Monsignor) on May 29, 2002 at 11:32 UTC

    It's probably just a typo.

    It is a good idea not to put unnecessary dates or version numbers in the ancillary files of module distros. It is the best way to avoid this type of snafu.

    --
    John.

      agreed.
      But that was nothing compared to 'VERSIONS' file from Tk800.024 and Tk804.023alpha distributions, which say theirs version is Tk402.001 !
      :)
Re: CPAN nodelet contains Compress-SelfExtracting-0.03 ...
by educated_foo (Vicar) on May 29, 2002 at 15:33 UTC
    Looks like I missed that one. I really should write a preprocessor to put the same version in both places. But I assure you, it is bona fide 0.03 goodness, for whatever definition of "goodness" you attach to a version number so far from 1.0.

    /s
    update: Okay, here's a quick hack to avoid this in the future. Lightly tested on my system. *NIX-only. Please read the code before using it.

    #!/usr/bin/env perl use strict; my $distrib; my $pkg = shift; if ($pkg eq '-p') { $distrib = 1; $pkg = shift; } $pkg or die <<USAGE; Usage: $0 [-p] packagename Find the canonical \$VERSION in a module. With -p, also create a distribution tarball. USAGE # Find the Makefile.PL (my $dir = $pkg) =~ s/::/-/g; open IN, "$dir/Makefile.PL" or die "$dir/Makefile.PL: $!"; my ($ver_from) = grep /VERSION_FROM/, <IN>; close IN; # Find where our version should come from. if ($ver_from =~ /VERSION_FROM.*?=>\s*([^,]+)/) { # Eval to remove quotes. $ver_from = eval qq{$1}; } else { die "Can't find VERSION_FROM for $pkg"; } # Okay, find the version from the $VERSION line. open IN, "$dir/$ver_from" or die "$dir/$ver_from: $!"; my ($ver) = grep /\$VERSION/, <IN>; close IN; if ($ver =~ /VERSION\s*=\s*(\S+)\s*;/) { $ver = eval qq{$1}; } else { die "No version for $pkg in $ver_from"; } print STDERR "version = $ver\n"; if ($distrib) { # Tidy up and package. system "cp -rp $dir $dir-$ver"; system "cd $dir-$ver; make clean; rm ./*~"; system "perl -i -pe 's/#VERSION#/$ver/' $dir-$ver/README"; system "tar czvf $dir-$ver.tgz $dir-$ver"; }
Re: CPAN nodelet contains Compress-SelfExtracting-0.03 ...
by belg4mit (Prior) on May 29, 2002 at 21:40 UTC
    The RSS feeds rely upon the filename. The documentation displays rely upon $VERSION. Compare English::Reference.

    --
    perl -pew "s/\b;([mnst])/'$1/g"