Subject: | ::RequireConstantVersion ($foo = $VERSION) =~ s/// case creates false positive |
See the attached test file.
C:\>perlcritic --brutal Foo.pm
$VERSION value must be a constant at line 7, column 43. Computed $VERSION may
tie the code to a single repository, or cause spook
y action from a distance. (Severity: 2)
The binding op is fooling the detection code.
Subject: | Foo.pm |
package Foo;
use strict;
use warnings;
our $VERSION = '1.0';
(my $BAR = sprintf q{%s/%s}, __PACKAGE__, $VERSION) =~ s{o\z}{}xms;
1;
__END__
=pod
=cut