develooper Front page | perl.perl5.porters | Postings from April 2007

Gratuitous trailing zeroes from version.pm

Thread Next
From:
andreas.koenig.7os6VVqR
Date:
April 9, 2007 11:38
Subject:
Gratuitous trailing zeroes from version.pm
Message ID:
87veg54cna.fsf@k75.linux.bogus
A few days ago I reported the following findings[0] to the author of
HTML::Template::Compiled and I must admit I felt a bit silly when I
wrote this:

  Bleadperl has a new version.pm that appends gratuitous zeros to
  versions for whatever reason. Nobody seems to object, so it's likely
  to stay that way.

We have the case of an author writing the $VERSION twice, once in
code, once in POD, and checking in a test if the value of
XXX->VERSION is indeed the same as the string found in the POD. The
check is done with a regexp and not with "==" and so fails with
bleadperl. Compareable but not identical to the snippet

  % perl -le '
  $VERSION = "0.84";
  my $v = main->VERSION;
  print $VERSION =~ /\Q$v/ ? "OK" : "NOT OK";
  '
  NOT OK

I know since a very long time that version.pm does that and I know it
is documented in the manpage. And I did not complain ever because I
thought that might just need a short time of education to get people
used to it.

The question I want to ask today is: does really everybody feel
comfortable with the decision to do the stringification with trailing
zeroes? Are there any arguments in favor of it? I fear we will regret
the decision after 5.10 is out unless we have a really good reason for
it. IMHO, the manpage needs at least a bit of an argument why these
trailing zeroes are appended.

-- 
andreas

[0] http://www.nntp.perl.org/group/perl.cpan.testers/2007/04/msg454837.html

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About