Perl::Critic::Policy::Bangs::ProhibitVagueNames - Don't use generic variable and subroutine names.
This Policy is part of the Perl::Critic::Bangs distribution.
Variables and subroutines should have descriptive names. Names like $data and $info are completely vague.
my $data = shift; # not OK.
my $userinfo = shift # OK
See http://www.oreillynet.com/onlamp/blog/2004/03/the_worlds_two_worst_variable.html for more of my ranting on this.
By default, the following names are bad: data, info, var, obj, object, tmp, temp
The checking of names is case-insensitive. $info and $INFO are equally bad.
This policy has two options: names and add_names.
To replace the list of vague names, specify them as a whitespace delimited set of prohibited names.
names = data count line next
To add to the list of vague names, specify them as a whitespace delimited set of prohibited names.
add_names = foo bar bat
Andy Lester <andy at petdance.com> from code by Andrew Moore <amoore at mooresystems.com>.
<andy at petdance.com>
<amoore at mooresystems.com>
Adapted from policies by Jeffrey Ryan Thalhammer <email@example.com>, Based on App::Fluff by Andy Lester, "<andy at petdance.com>"
Copyright (c) 2006-2013 Andy Lester
This library is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0.
To install Perl::Critic::Bangs, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.