.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Perl::Critic::PolicyParameter 3pm" .TH Perl::Critic::PolicyParameter 3pm 2023-07-26 "perl v5.38.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Perl::Critic::PolicyParameter \- Metadata about a parameter for a Policy. .SH DESCRIPTION .IX Header "DESCRIPTION" A provider of validation and parsing of parameter values and metadata about the parameter. .SH "INTERFACE SUPPORT" .IX Header "INTERFACE SUPPORT" This is considered to be a public class. Any changes to its interface will go through a deprecation cycle. .SH METHODS .IX Header "METHODS" .ie n .IP get_name() 4 .el .IP \f(CWget_name()\fR 4 .IX Item "get_name()" Return the name of the parameter. This is the key that will be looked for in the \fI.perlcriticrc\fR. .ie n .IP get_description() 4 .el .IP \f(CWget_description()\fR 4 .IX Item "get_description()" Return an explanation of the significance of the parameter, as provided by the developer of the policy. .ie n .IP get_default_string() 4 .el .IP \f(CWget_default_string()\fR 4 .IX Item "get_default_string()" Return a representation of the default value of this parameter as it would appear if it was specified in a \fI.perlcriticrc\fR file. .ie n .IP """parse_and_validate_config_value( $parser, $config )""" 4 .el .IP "\f(CWparse_and_validate_config_value( $parser, $config )\fR" 4 .IX Item "parse_and_validate_config_value( $parser, $config )" Extract the configuration value for this parameter from the overall configuration and initialize the policy based upon it. .ie n .IP generate_full_description() 4 .el .IP \f(CWgenerate_full_description()\fR 4 .IX Item "generate_full_description()" Produce a more complete explanation of the significance of this parameter than the value returned by \f(CWget_description()\fR. .Sp If no description can be derived, returns the empty string. .Sp Note that the result may contain multiple lines. .ie n .IP "to_formatted_string( $format )" 4 .el .IP "\f(CWto_formatted_string( $format )\fR" 4 .IX Item "to_formatted_string( $format )" Generate a string representation of this parameter, based upon the format. .Sp The format is a combination of literal and escape characters similar to the way \f(CW\*(C`sprintf\*(C'\fR works. If you want to know the specific formatting capabilities, look at String::Format. Valid escape characters are: .RS 4 .ie n .IP %n 4 .el .IP \f(CW%n\fR 4 .IX Item "%n" The name of the parameter. .ie n .IP %d 4 .el .IP \f(CW%d\fR 4 .IX Item "%d" The description, as supplied by the programmer. .ie n .IP %D 4 .el .IP \f(CW%D\fR 4 .IX Item "%D" The default value, in a parsable form. .ie n .IP %f 4 .el .IP \f(CW%f\fR 4 .IX Item "%f" The full description, which is an extension of the value returned by \&\f(CW%d\fR. Takes a parameter of a prefix for the beginning of each line. .RE .RS 4 .RE .SH "SEE ALSO" .IX Header "SEE ALSO" "MAKING YOUR POLICY CONFIGURABLE" in Perl::Critic::DEVELOPER .SH AUTHOR .IX Header "AUTHOR" Elliot Shank .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright (c) 2006\-2011 Elliot Shank. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module.