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

Re: Perl 7 - updates

Thread Previous | Thread Next
Kent Fredric
July 4, 2020 00:28
Re: Perl 7 - updates
Message ID:
On Sat, 4 Jul 2020 at 12:10, Todd Rinaldo <> 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.



Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About