in reply to Re^3: Perl usage (version number)
in thread Perl usage

> So $Revision 1.2.3.4.5$ becomes 1.02.03.04.05.

well , yes, except it doesn't

DB<30> p $VERSION = do { my @r = (q$Revision: 1.2.3.4.5 $ =~ /\d+/g) +; sprintf "%d."."%02d" x $#r, @r }; 1.02030405

That's what I meant with different version formats and potential bug.

IMHO $VERSION is supposed to be a float which can be compared numerically with < , == and >.

There is some mention of a version object, but this seems to be restricted to Perl's own Version.

DB<34> use Data::Dump qw/dd/ DB<35> dd $] 5.016003 DB<36> dd $^V bless({ original => "v5.16.3", qv => 1, version => [5, 16, 3] }, +"version")

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

Replies are listed 'Best First'.
Re^5: Perl usage (version number)
by dsheroh (Monsignor) on Nov 24, 2015 at 07:54 UTC
    Ouch... Yes, I was a bit too hasty and assumed the actual output would be in the format I expected it to generate. Thanks for correcting my mistake!