1Perl::Critic::PolicyParUasmeerteCro(n3t)ributed Perl DocPuemreln:t:aCtriiotnic::PolicyParameter(3)
2
3
4
6 Perl::Critic::PolicyParameter - Metadata about a parameter for a
7 Policy.
8
10 A provider of validation and parsing of parameter values and metadata
11 about the parameter.
12
14 This is considered to be a public class. Any changes to its interface
15 will go through a deprecation cycle.
16
18 "get_name()"
19 Return the name of the parameter. This is the key that will be
20 looked for in the .perlcriticrc.
21
22 "get_description()"
23 Return an explanation of the significance of the parameter, as
24 provided by the developer of the policy.
25
26 "get_default_string()"
27 Return a representation of the default value of this parameter as
28 it would appear if it was specified in a .perlcriticrc file.
29
30 "parse_and_validate_config_value( $parser, $config )"
31 Extract the configuration value for this parameter from the overall
32 configuration and initialize the policy based upon it.
33
34 "generate_full_description()"
35 Produce a more complete explanation of the significance of this
36 parameter than the value returned by "get_description()".
37
38 If no description can be derived, returns the empty string.
39
40 Note that the result may contain multiple lines.
41
42 "to_formatted_string( $format )"
43 Generate a string representation of this parameter, based upon the
44 format.
45
46 The format is a combination of literal and escape characters
47 similar to the way "sprintf" works. If you want to know the
48 specific formatting capabilities, look at String::Format. Valid
49 escape characters are:
50
51 %n The name of the parameter.
52
53 %d The description, as supplied by the programmer.
54
55 %D The default value, in a parsable form.
56
57 %f The full description, which is an extension of the value
58 returned by %d. Takes a parameter of a prefix for the
59 beginning of each line.
60
62 "MAKING YOUR POLICY CONFIGURABLE" in Perl::Critic::DEVELOPER
63
65 Elliot Shank <perl@galumph.com>
66
68 Copyright (c) 2006-2011 Elliot Shank.
69
70 This program is free software; you can redistribute it and/or modify it
71 under the same terms as Perl itself. The full text of this license can
72 be found in the LICENSE file included with this module.
73
74
75
76perl v5.34.0 2021-07-22 Perl::Critic::PolicyParameter(3)