develooper Front page | perl.module-authors | Postings from April 2019

Re: [RFC] File::TVShow::Parse

Thread Previous | Thread Next
From:
Dan Book
Date:
April 16, 2019 19:59
Subject:
Re: [RFC] File::TVShow::Parse
Message ID:
CABMkAVWLbUKgo91oViviZKsCS3sNij49466E1A7csXxhMH+s-A@mail.gmail.com
It depends entirely what Perls you want to support. If you only want to
support Perl 5.10 or newer, module versions in the dotted-decimal form are
fine as long as you always declare them as strings and don't use
underscores. If you want to support older than that, you have to jump
through some hoops or risk users getting the wrong behavior.

For the 'use X' statement itself for declaring a minimum perl version of a
file, the '5.XXXYYY' format is still (always?) recommended, because it will
make sure that running it on older Perls will result in a sensible error
message.

-Dan

On Tue, Apr 16, 2019 at 3:54 PM John M. Gamble <jgamble@ripco.com> wrote:

> On Mon, April 15, 2019 12:46 pm, David Cantrell wrote:
> > On Mon, Apr 15, 2019 at 12:04:24PM -0400, Dan Book wrote:
> >
> >> As a side note, remember that the X.Y.Z form of versions (with more than
> >> one decimal point) is a sequence of integers ...
> >
> > Sadly it's worse than that.
> >
> > There exists popular software management software out there written by
> > idiots who think that 3.0014 > 3.1, so that rule applies even when
> > you're using numbers in the form X.Y with a single decimal point. Those
> > people did a lot of hard work to break numeric comparisons, one of the
> > few things that computers are any good at.
>
> Are we at the point where there is no reason to not use X.Y.Z? I recall (I
> think) the historical reasons for using the 5.00y00z format, but given
> that minimum Perl versions are now specified in META.* files, surely
> there's no real reason to keep doing that anymore?
>
> I say this while looking at all my modules, which still use the fraction
> format.
>
>      -john
>

Thread Previous | 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