Item14920: Use of deprecated regexp syntax, will be fatal in Perl 5.30

pencil
Priority: Enhancement
Current State: New
Released In: n/a
Target Release:
Applies To: Extension
Component: AliasPlugin
Branches:
Reported By: ChristianKern
Waiting For:
Last Change By: ChristianKern
My Foswiki's Apache error log is full of warnings like that:

Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by <-- HERE in m/(%ALIAS{ <-- HERE (.*?)}%)/ at /var/www/foswiki/lib/Foswiki/Plugins/AliasPlugin.pm line 288.

So, one would have to replace
$text =~ s/(%ALIAS{(.*?)}%)/takeOutAliasMacro($1, $2, $macros)/gmse;

with
$text =~ s/(%ALIAS\{(.*?)\}%)/takeOutAliasMacro($1, $2, $macros)/gmse;

I run Foswiki 2.1.6 with Apache 2.4.38 and Perl 5.28 on Debian 10.

-- ChristianKern - 04 Jun 2020

 

  • AliasPlugin.pm.patch: Possible patch to apply to /var/www/foswiki/lib/Foswiki/Plugins/AliasPlugin.pm

ItemTemplate edit

Summary Use of deprecated regexp syntax, will be fatal in Perl 5.30
ReportedBy ChristianKern
Codebase
SVN Range
AppliesTo Extension
Component AliasPlugin
Priority Enhancement
CurrentState New
WaitingFor
Checkins
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release02x01Checkins
Release02x00Checkins
Release01x01Checkins
I Attachment Action Size Date Who Comment
AliasPlugin.pm.patchpatch AliasPlugin.pm.patch manage 358 bytes 05 Jun 2020 - 09:09 ChristianKern Patch to apply to /var/www/foswiki/lib/Foswiki/Plugins/AliasPlugin.pm
Topic revision: r2 - 05 Jun 2020, ChristianKern
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy