Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variables::ProhibitUnusedVariables false positive with .= in initial assignment #703

Open
epa opened this issue Oct 13, 2016 · 0 comments
Open
Labels

Comments

@epa
Copy link

epa commented Oct 13, 2016

my $x .= '';
my $y .= <<END
$x
END
;
print $y;

This gives a false positive

"$x" is declared but not used [Variables::ProhibitUnusedVariables]

Of course the initial assignment with .= is fishy, and there is a separate policy for that, but the variable is not unused. The heredoc seems to be necessary to trigger the bug.

@petdance petdance added the Bug label Jan 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants