Debian Bug report logs - #706303
libperl-critic-perl: until block false-positive in hash key

version graph

Package: libperl-critic-perl; Maintainer for libperl-critic-perl is Debian Perl Group <[email protected]>; Source for libperl-critic-perl is src:libperl-critic-perl (PTS, buildd, popcon).

Reported by: Guillem Jover <[email protected]>

Date: Sat, 27 Apr 2013 23:33:02 UTC

Severity: normal

Found in version libperl-critic-perl/1.118-1

Forwarded to http://rt.cpan.org/Public/Bug/Display.html?id=84898

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Debian Perl Group <[email protected]>:
Bug#706303; Package libperl-critic-perl. (Sat, 27 Apr 2013 23:33:06 GMT) (full text, mbox, link).


Acknowledgement sent to Guillem Jover <[email protected]>:
New Bug report received and forwarded. Copy sent to Debian Perl Group <[email protected]>. (Sat, 27 Apr 2013 23:33:06 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Guillem Jover <[email protected]>
To: [email protected]
Subject: libperl-critic-perl: until block false-positive in hash key
Date: Sun, 28 Apr 2013 01:29:55 +0200
Package: libperl-critic-perl
Version: 1.118-1
Severity: normal

Hi!

I found the following false-positive while going through the dpkg code
base:

,--- until.pl ---
#!/usr/bin/perl

use strict;
use warnings;

our $VERSION = '0.00';

my %hash;

$hash{since}   = 0;
$hash{until}   = 1;
$hash{'until'} = 0;
`---

which gives:

  $ perlcritic --verbose 1 -1 until.pl
  until.pl:11:7:"until" block used

Thanks,
Guillem



Set Bug forwarded-to-address to 'http://rt.cpan.org/Public/Bug/Display.html?id=84898'. Request was from Salvatore Bonaccorso <[email protected]> to [email protected]. (Sun, 28 Apr 2013 06:09:04 GMT) (full text, mbox, link).


Information forwarded to [email protected], Debian Perl Group <[email protected]>:
Bug#706303; Package libperl-critic-perl. (Tue, 30 Apr 2013 13:24:04 GMT) (full text, mbox, link).


Acknowledgement sent to Guillem Jover <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <[email protected]>. (Tue, 30 Apr 2013 13:24:04 GMT) (full text, mbox, link).


Message #12 received at [email protected] (full text, mbox, reply):

From: Guillem Jover <[email protected]>
To: [email protected]
Subject: Re: Bug#706303: libperl-critic-perl: until block false-positive in hash key
Date: Tue, 30 Apr 2013 15:21:53 +0200
Hi!

On Sun, 2013-04-28 at 01:29:55 +0200, Guillem Jover wrote:
> Package: libperl-critic-perl
> Version: 1.118-1
> Severity: normal
> 
> I found the following false-positive while going through the dpkg code
> base:
> 
> ,--- until.pl ---
> #!/usr/bin/perl
> 
> use strict;
> use warnings;
> 
> our $VERSION = '0.00';
> 
> my %hash;
> 
> $hash{since}   = 0;
> $hash{until}   = 1;
> $hash{'until'} = 0;
> `---
> 
> which gives:
> 
>   $ perlcritic --verbose 1 -1 until.pl
>   until.pl:11:7:"until" block used

Actually, I missed an older instance that I had already marked to not
be criticized, here's the updated test case:

,--- until.pl ---
#!/usr/bin/perl

use strict;
use warnings;

our $VERSION = '0.00';

my %hash;
$hash{since}   = 0;
$hash{until}   = 1;
$hash{'until'} = 0;

sub func { }
func( { since   => 0, until => 1 } );
func( { until   => 1, since => 0 } );
func( { 'until' => 1, since => 0 } );
`---

And the violations:

  $ perlcritic --verbose 1 -1 until.pl
  until.pl:10:7:"until" block used
  until.pl:15:9:"until" block used

Thanks,
Guillem



Information forwarded to [email protected], Debian Perl Group <[email protected]>:
Bug#706303; Package libperl-critic-perl. (Thu, 02 May 2013 19:54:07 GMT) (full text, mbox, link).


Acknowledgement sent to Salvatore Bonaccorso <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <[email protected]>. (Thu, 02 May 2013 19:54:07 GMT) (full text, mbox, link).


Message #17 received at [email protected] (full text, mbox, reply):

From: Salvatore Bonaccorso <[email protected]>
To: Guillem Jover <[email protected]>, [email protected]
Subject: Re: Bug#706303: libperl-critic-perl: until block false-positive in hash key
Date: Thu, 2 May 2013 21:52:13 +0200
Hi Guillem

On Tue, Apr 30, 2013 at 03:21:53PM +0200, Guillem Jover wrote:
> Hi!
> 
> On Sun, 2013-04-28 at 01:29:55 +0200, Guillem Jover wrote:
> > Package: libperl-critic-perl
> > Version: 1.118-1
> > Severity: normal
> > 
> > I found the following false-positive while going through the dpkg code
> > base:
> > 
> > ,--- until.pl ---
> > #!/usr/bin/perl
> > 
> > use strict;
> > use warnings;
> > 
> > our $VERSION = '0.00';
> > 
> > my %hash;
> > 
> > $hash{since}   = 0;
> > $hash{until}   = 1;
> > $hash{'until'} = 0;
> > `---
> > 
> > which gives:
> > 
> >   $ perlcritic --verbose 1 -1 until.pl
> >   until.pl:11:7:"until" block used
> 
> Actually, I missed an older instance that I had already marked to not
> be criticized, here's the updated test case:

Thanks! Updated upstream bugtracker information.

Regards,
Salvatore



Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 12:24:56 2025; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.