in reply to Regexp::Common and "multidimensional hash lookup disabled" (v5.36+)
G'day ibm1620,
"Is there a way to make it work under v5.36 and beyond?"
A tedious fix in all of your scripts so that they work today:
use v5.36; use feature 'multidimensional'; use Regexp::Common;
Update: What follows turned out to be incorrect information. This is explained in "Re^2: Regexp::Common and "multidimensional hash lookup disabled"". I have stricken the remainder of the original post but retained it in the spoiler.
A permanent fix would be a bug report providing a patch that adds this statement near the start of Regexp::Common:
use if $] >= 5.035, feature => 'multidimensional';
For the reasoning behind choosing 5.035, see "Perl v5.35.6 release notes":
Core Enhancements
use v5.36 now disables ... multidimensional
The :5.36 bundle, loaded by use v5.36, no longer includes ... multidimensional ...
This will also affect use v5.35.x, even on subversions of v5.35 prior to this one.
As a test, I changed the start of your posted code to:
#!/usr/bin/env perl use v5.36; use Regexp::Common; package Regexp::Common; use if $] >= 5.035, feature => 'multidimensional'; package main;
A quick test run:
$ ./pm_11153245_regexp_common.pl /qwerty/ a /.../ sequence
You may want to do more substantial testing. :-)
— Ken
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regexp::Common and "multidimensional hash lookup disabled"
by LanX (Saint) on Jul 02, 2023 at 15:07 UTC | |
by kcott (Archbishop) on Jul 10, 2023 at 13:49 UTC | |
by LanX (Saint) on Jul 10, 2023 at 20:24 UTC | |
|
Re^2: Regexp::Common and "multidimensional hash lookup disabled"
by kcott (Archbishop) on Jul 10, 2023 at 13:33 UTC | |
|
Re^2: Regexp::Common and "multidimensional hash lookup disabled"
by ibm1620 (Hermit) on Jul 03, 2023 at 22:14 UTC |