#697993 libperl-critic-perl: Comma separated statement false positive on scalar hashref

#697993#5
Date:
2013-01-12 15:20:36 UTC
From:
To:
Hi!

Here's what seems like a false positive that I found while going over
the dpkg code:

,--- scalarref-comma.pl
#!/usr/bin/perl

use strict;
use warnings;

our $VERSION = '0.0';

my $scalarref = \{
    'name' => [],
};

1;
`---

Reproducible with:

  $ perlcritic -s ProhibitCommaSeparatedStatements scalarref-comma.pl

If the single quotes around 'name' are removed, then it does not seem
to trigger.

Thanks,
Guillem

#697993#12
Date:
2013-01-12 16:06:55 UTC
From:
To:
Hi Guillem

Thanks, also this issue forwarded to upstream.

Regards,
Salvatore

#697993#21
Date:
2022-06-26 18:20:31 UTC
From:
To:
According to the upstream ticket¹, this is now working since version
1.121-1, so closing.