1Perl::Critic::Policy::BUasnegrs:C:oPPnertrorlhi:ib:buCitrteiVdtaigPcue:er:NlPaomDleoiscc(uy3m:)e:nBtaantgiso:n:ProhibitVagueNames(3)
2
3
4

NAME

6       Perl::Critic::Policy::Bangs::ProhibitVagueNames - Don't use generic
7       variable and subroutine names.
8

AFFILIATION

10       This Policy is part of the Perl::Critic::Bangs distribution.
11

DESCRIPTION

13       Variables and subroutines should have descriptive names. Names like
14       $data and $info are completely vague.
15
16          my $data = shift;      # not OK.
17          my $userinfo = shift   # OK
18
19       See
20       <http://www.oreillynet.com/onlamp/blog/2004/03/the_worlds_two_worst_variable.html>
21       for more of my ranting on this.
22
23       By default, the following names are bad: data, info, var, obj, object,
24       tmp, temp
25
26       The checking of names is case-insensitive.  $info and $INFO are equally
27       bad.
28

CONFIGURATION

30       This policy has two options: "names" and "add_names".
31
32   "names"
33       To replace the list of vague names, specify them as a whitespace
34       delimited set of prohibited names.
35
36           [Bangs::ProhibitVagueNames]
37           names = data count line next
38
39   "add_names"
40       To add to the list of vague names, specify them as a whitespace
41       delimited set of prohibited names.
42
43           [Bangs::ProhibitVagueNames]
44           add_names = foo bar bat
45

AUTHOR

47       Andy Lester "<andy at petdance.com>" from code by Andrew Moore "<amoore
48       at mooresystems.com>".
49

ACKNOWLEDGMENTS

51       Adapted from policies by Jeffrey Ryan Thalhammer <thaljef@cpan.org>,
52       Based on App::Fluff by Andy Lester, "<andy at petdance.com>"
53
55       Copyright (c) 2006-2013 Andy Lester
56
57       This library is free software; you can redistribute it and/or modify it
58       under the terms of the Artistic License 2.0.
59
60
61
62perl v5.30.0                Perl::2C0r1i9t-i0c7:-:2P6olicy::Bangs::ProhibitVagueNames(3)
Impressum