Bug#761508: libperl-critic-perl: Useless topic variable usage false positive on @_

Guillem Jover guillem at debian.org
Sun Sep 14 13:47:11 UTC 2014


Package: libperl-critic-perl
Version: 1.122-1
Severity: normal
Tags: upstream

Hi!

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

,--- critic-topic.pl ---
#!/usr/bin/perl

use strict;
use warnings;

our $VERSION = '0.0';

sub func {
    return 1 if -l $_[0];
    return 0;
}

func('pathname');

1;
`---

Reproducible with:

   $ perlcritic -s BuiltinFunctions::ProhibitUselessTopic critic-topic.pl

Of course unpacking @_ makes this go away, which I'll be doing on that
codebase, but the warning is still wrong IMO.

Thanks,
Guillem



More information about the pkg-perl-maintainers mailing list