Fix perltidy breaking perlcritic

perltidying a "##no critic" line moves the marker to where it becomes
useless.  Put the line back to how it was, and protect it from further
malfeasance.

Per buildfarm member crake.
This commit is contained in:
Alvaro Herrera 2022-09-08 11:16:09 +02:00
parent cb62d0b3c3
commit 12d40d4a8d
No known key found for this signature in database
GPG Key ID: 1C20ACB9D5C564AE
1 changed files with 4 additions and 2 deletions

View File

@ -315,8 +315,10 @@ sub ParseData
# We're treating the input line as a piece of Perl, so we
# need to use string eval here. Tell perlcritic we know what
# we're doing.
eval '$hash_ref = '
. $_; ## no critic (ProhibitStringyEval)
#<<< protect next line from perltidy
# so perlcritic annotation works
eval '$hash_ref = ' . $_; ## no critic (ProhibitStringyEval)
#>>>
if (!ref $hash_ref)
{
die "$input_file: error parsing line $.:\n$_\n";