develooper Front page | perl.perl5.porters | Postings from July 2020

Re: Perl 7 - updates

Thread Previous | Thread Next
From:
Kent Fredric
Date:
July 4, 2020 00:38
Subject:
Re: Perl 7 - updates
Message ID:
CAATnKFCx=n+68dENt7arhEr-wgC1TM9CqCjJUhVmw3agi57x_w@mail.gmail.com
On Sat, 4 Jul 2020 at 12:27, Todd Rinaldo <toddr@cpanel.net> wrote:
> What I really kinda want for my own company's code base is 'use vl' (latest) or 'use vi' (infinity?) which would always choose all the new features of the coming major version. If that existed, our code would just set that and as we always do, adjust our code as we switch to a new version of Perl. Then we don't have to update 5000 files in our code base when we switch to Perl 8 or 9. But this is a wish list item. If we don't get this, we'll just do a big commit and move on ¯\_(ツ)_/¯.

Fortunately, due to "vl" and "vi" being parsed as strings, not
versions, you can probably do that as  a CPAN module.

sub import {
    my $v = "$]";
    $v =~ s/\..*//;
    feature->import(":$v");
}

Or something along those lines.

-- 
Kent

KENTNL - https://metacpan.org/author/KENTNL

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