Tom Wyant
and 1 contributors

NAME

unused-vars - Find unused variables in Perl code

SYNOPSIS

 unused-vars .
 unused-vars lib/
 unused-vars -help
 unused-vars -version

OPTIONS

The following options are parsed by this script. All options not specifically mentioned below are passed to Perl-Critic.

-help

This option displays the documentation for this script. The script then exits.

-noprofile

This option specifies that no profile be used. It specifically prevents the use of the default profile.

-profile profile_file

This option specifies the profile file to use.

-single-policy policy_name

This option exists simply to intercept any attempt to specify a policy other than Variables::ProhibitUnusedVarsStricter.

-version

This option displays the version of this script. The script then exits.

DESCRIPTION

This Perl script wraps the rogue Perl::Critic policy Variables::ProhibitUnusedVarsStricter. This is a variant of Variables::ProhibitUnusedVariables that actually has some teeth.

If no arguments are passed, the contents of the MANIFEST are scanned -- at least, those which appear to be Perl files.

Almost all perlcritic options are simply passed through. However:

-profile and -noprofile are intercepted by this script so that if neither is specified it can supply its own default, which is ~/.perlcritic-unused-vars.

-single-policy is intercepted by this script to prevent it being passed to Perl-Critic. A warning is issued if this option is actually found.

AUTHOR

Thomas R. Wyant, III wyant at cpan dot org

COPYRIGHT

Copyright (C) 2012-2017 by Thomas R. Wyant, III

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For more details, see the full text of the licenses in the directory LICENSES.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.