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

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

Thread Previous
From:
Dan Book
Date:
April 16, 2019 21:15
Subject:
Re: [RFC] File::TVShow::Parse
Message ID:
CABMkAVX=c=KALeNENUZADdXD106ptZ6bgnVOH8MUEmj=Yf7zFg@mail.gmail.com
It would be either the job of the install script or static install process
to determine that the Perl is too old, yes. In the former case, it's
commonly hard-blocked by a "use 5.XXX" statement in the Makefile.PL or
Build.PL, in the legacy format, as META.json is only used for configure
phase prereqs in this case. In the latter case it would be via the perl
runtime prereq in META.json - and only by an installer new enough to
understand all of this anyway.

This is all just for what version of Perl you support, though; for your
module version, as long as you have a declared Perl minimum version in one
of these ways, either version format is fine.

-Dan

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

> I'm already on record on not supporting anything older than 5.10.1*. But
> the reason I mentioned the META.* files is because I would think (well,
> hope) that that in itself should be enough to prevent older Perls from
> even looking at the package**.
>
> Therefore, if the package isn't ever downloaded by these older Perls, the
> 'use' statement can use the all-integer format without problem. In theory.
>
>      -john
>
> ---
> * In two or three years I'll be changing that to 5.16.1.
>
> ** People who deliberately override that restriction aren't part of this
> conversation.
>
> On Tue, April 16, 2019 2:59 pm, Dan Book wrote:
> > 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


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