If you have a Perl-related news item you'd like to share, you may post it in the Perl Newssection.
Please try to avoid duplicating news; but pointers (with summaries) to important stories on other sites are acceptable here.
wiringPi, a library for GPIO access on the Raspberry Pi is now deprecated, for the all too familiar reasons of abuse and unreasonable expectations of others. I think all of the perl and python libraries I've seen for Pi GPIO are dependent on this.
In a blog post by Dave Cross on the Perl conference in Riga there is this...
The second day started with Liz Mattijsen’s keynote DeMythifying Perl 6. I was surprised when she stated that “Perl 6 has damaged Perl 5” was not a myth, but a fact and was totally blown away when she followed that up with a proposal to rename Perl 6.
Plugin now understands Perl much better and can infer values
of different operations and invocations. Therefore - resolve and completion should be much better in many places. (Seriously,
sometimes it's looks just like a magic.)
Names suggester now taking inferred values into account when
suggesting variable names.
Introduce variable action is now available for the Perl code
Pod support has been deeply re-worked and should be much
Quick-doc on built-ins
Quick-doc on completion elements
Better completion, live-templates, smart keys, resolve and
refactoring for POD
Re-worked POD color settings
Basic project model
Actions to create an application, plugin or lite
or to some variation thereof. But this is not how the regex discussion ends in the blog post:
But laziness isn’t the total solution to this backtracking behaviour. Changing the catastrophic example .*.*=.*; to .*?.*?=.*?; doesn’t change its run time at all. x=x still takes 555 steps and x= followed by 20 x’s still takes 5,353 steps.
The only real solution, short of fully re-writing the pattern to be more specific, is to move away from a regular expression engine with this backtracking mechanism. Which we are doing within the next few weeks.
I am guessing this is politically driven: Some people at Cloudflare want to use Rust and this snafu is a convenient excuse.
Another angle to consider is that of personnel. The postmortem does not dwell on the fact that this regular expression made it through review. Meaning that not only the person who wrote the regular expression was unaware of the backtracking potential of the above, but neither did the reviewer.
This will create a text document in a newly created modules directory within your Perl installation directory (by default, C:\berrybrew), named after the version of Perl you exported the module list from (eg: 5.20.3_64). This file has a single distribution name per line.
You can go ahead and edit this file (remove or add as many distribution names as you like), then when you're ready to import into a different Perl instance, simply berrybrew switch to it (note that as always, when switching Perls, you must close the command window and open a new one), then:
This can take a very, very long time, so it's advised to only import on a Perl instance that's newer than Perl you exported from. That, or significantly clean the file up for unneeded distributions.
Another benefit to this system, is that you can manually create a module "bundle" file within the mentioned "modules" directory, and add all distributions you prefer on all of your Perls. So:
create a C:\berrybrew\modules\base_modules_template file
add in any distributions you want to automatically and easily install
switch to the Perl instance you want to install into (or just make this habit for each new install you perform)
run berrybrew modules import base_modules_template to have your custom distribution list installed automatically
You can remove all exported files by using the berrybrew clean modules command, but beware that if you have any manually created export files per above, they will be removed as well. I've got an issue open for the next release so that clean modules leaves any custom files in place.
Most of the other changes were quite minor this round, mainly back-end stuff, doc updates/fixes and test additions/modifications, along with an updated perls.json file with the newly released 5.30 version.
Feedback, as always, is welcome (as are any bug tickets).
** - we don't actually clone or copy anything; on import, we use cpanm to do a full install of each listed distribution/module, each will have the most recently available production release installed.
manwar has started a Perl Weekly Challenge to encourage both those new to Perl and old hands to try solving a weekly problem or two with Perl. Anyone can sign up at any time or just browse the blogged solutions (the first one is from BooK).
Solutions to the challenges are encouraged in either/both Perl or Raku so there should be something for everyone.