Perl::Critic::Config

Perl::Critic::Config is a Perl module to find and load Perl::Critic user-preferences.
Download

Perl::Critic::Config Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Jeffrey Ryan Thalhammer
  • Publisher web site:
  • http://search.cpan.org/~elliotjs/Perl-Critic/lib/Perl/Critic.pm

Perl::Critic::Config Tags


Perl::Critic::Config Description

Perl::Critic::Config is a Perl module to find and load Perl::Critic user-preferences. Perl::Critic::Config is a Perl module to find and load Perl::Critic user-preferences.Perl::Critic::Config takes care of finding and processing user-preferences for Perl::Critic. The Config object defines which Policy modules will be loaded into the Perl::Critic engine and how they should be configured. You should never really need to instantiate Perl::Critic::Config directly because the Perl::Critic constructor will do it for you.CONSTRUCTORnew( ) new()Returns a reference to a new Perl::Critic::Config object. The default value for all arguments can be defined in your .perlcriticrc file. See the "CONFIGURATION" section for more information about that. All arguments are optional key-value pairs as follows:-profile is a path to a configuration file. If $FILE is not defined, Perl::Critic::Config attempts to find a .perlcriticrc configuration file in the current directory, and then in your home directory. Alternatively, you can set the PERLCRITIC environment variable to point to a file in another location. If a configuration file can't be found, or if $FILE is an empty string, then all Policies will be loaded with their default configuration. See "CONFIGURATION" for more information.-severity is the minimum severity level. Only Policy modules that have a severity greater than $N will be loaded into this Config. Severity values are integers ranging from 1 (least severe) to 5 (most severe). The default is 5. For a given -profile, decreasing the -severity will usually result in more Policy violations. Users can redefine the severity level for any Policy in their .perlcriticrc file. See "CONFIGURATION" for more information.-theme is special string that defines a set of Policies based on their respective themes. If -theme is given, only policies that are members of that set will be loaded. See the "POLICY THEMES" section for more information about themes. Unless the -severity option is explicitly given, setting -theme causes the -severity to be set to 1.-include is a reference to a list of string @PATTERNS. Policies that match at least one m/$PATTERN/imx will be loaded into this Config, irrespective of the severity settings. You can use it in conjunction with the -exclude option. Note that -exclude takes precedence over -include when a Policy matches both patterns.-exclude is a reference to a list of string @PATTERNS. Polices that match at least one m/$PATTERN/imx will not be loaded into this Config, irrespective of the severity settings. You can use it in conjunction with the -include option. Note that -exclude takes precedence over -include when a Policy matches both patterns.-single-policy is a string PATTERN. Only the policy that matches m/$PATTERN/imx will be used. This value overrides the -severity, -theme, -include, -exclude, and -only options.-top is the maximum number of Violations to return when ranked by their severity levels. This must be a positive integer. Violations are still returned in the order that they occur within the file. Unless the -severity option is explicitly given, setting -top silently causes the -severity to be set to 1.-only is a boolean value. If set to a true value, Perl::Critic will only choose from Policies that are mentioned in the user's profile. If set to a false value (which is the default), then Perl::Critic chooses from all the Policies that it finds at your site.-strict-profile is a boolean value. If set to a true value, Perl::Critic will make certain warnings about problems found in a .perlcriticrc or file specified via the -profile option fatal. In particular, Perl::Critic normally only warns about profiles referring to non-existent Policies, but this option makes this situation fatal.-force controls whether Perl::Critic observes the magical "## no critic" pseudo-pragmas in your code. If set to a true value, Perl::Critic will analyze all code. If set to a false value (which is the default) Perl::Critic will ignore code that is tagged with these comments. See "BENDING THE RULES" for more information.-verbose can be a positive integer (from 1 to 10), or a literal format specification. See Perl::Critic::Violations for an explanation of format specifications.-color is not used by Perl::Critic but is provided for the benefit of perlcritic. Requirements: · Perl


Perl::Critic::Config Related Software