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:28
Subject:
Re: Perl 7 - updates
Message ID:
CAATnKFDEmAXLT_Vp3+5e9HcKdgk5_qNiPAkzy=8Vw5YCuzATQg@mail.gmail.com
On Sat, 4 Jul 2020 at 12:10, Todd Rinaldo <toddr@cpanel.net> wrote:

> I'm working on a module right now that will walk a file tree and auto-inject 'use v5;' at the top of any Perl code (as the first line of the file after any #!) that does not have use vX. It then also auto-updates the XS code with its faulty version checks. I think this will solve 99% of CPAN and the 1% outlier (I don't know of any outliers at the moment) can be fixed by hand if it needs it.

Something to consider:

I recall seeing some perl scripts which had a nice little blob of code
at the top, which did nothing on perl, but due to *also* being valid
bash, prevented bash getting carried away trying to execute the rest
of the code as bash script.

If there's a way to do that nicely, that'd be cool. ( Though I
speculate this will very much fall into a hard basket, as `use vX`
probably isn't valid bash )

And I suspect really cool tricks like "a postscript file which is also
somehow carefully constructed, valid, executable, useful perl code"
might go the way of the dodo. Its' very niche, I admit, but it will
still be sad.

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