NAME

perlvars - A command line utility for detecting unused Perl variables

VERSION

version 0.000001

SYNOPSIS

Detect unused variables in Perl code.

perlvars file1 file2

You can also ignore arbitrary variables on a per-package basis, using an ignore file.

perlvars --ignore-file ignore-list.txt file1 file2

See the documentation for App::perlvars for the format of the ignore file.

If you'd like to check every .pm file in your lib directory, you can try something like:

find lib | grep pm$ | xargs perlvars

DESCRIPTION

This script is a wrapper around Test::Vars, which tries to find unused variables in your Perl code. Please note that since Test::Vars only finds unused variables contained within packages, code which does not have an explicit package name will not be checked.

SEE ALSO

You may also wish to use Perl::Critic::Policy::Variables::ProhibitUnusedVarsStricter which can find some cases which Test::Vars is not able to detect. It also does not require the code to be inside a package.

AUTHOR

Olaf Alders <olaf@wundercounter.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2022 by MaxMind, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.