NAME
Perl::Critic::Theme - Construct thematic sets of policies
DESCRIPTION
This is a helper class for evaluating theme expressions into sets of Policy objects. There are no user-serviceable parts here.
METHODS
new( -theme => $theme_expression, -policies => \@polcies )
-
Returns a reference to a new Perl::Critic::Theme object.
-theme
is a string expression that defines how to construct the Theme.-policies
is a reference to an array of Perl::Critic::Policy objects, from which the Theme will be constructed. See "THEME EXPRESSIONS" for more information. members()
-
Returns a list of Policy objects that comprise this Theme.
expression()
-
Returns the theme expression that was used to construct this Theme. See "THEME EXPRESSIONS" for more information.
THEME EXPRESSIONS
Theme expressions are simple mathematical expressions, where the operands are the names of any of the themes associated with the Perl::Critic::Polices. Each operand represents the set of all Policies that are declared with or configured with that particular theme.
Theme names can be combined with basic mathematical operators into arbitrarily complex expressions. Precedence is the same as normal mathematics, but you can use parens to enforce precedence as well. Supported operators are:
Operator Altertative Meaning
----------------------------------------------------------------------------
* and Intersection
- not Difference
+ or Union
See <Perl::Critic/"CONFIGURATION"> for more information about customizing the themes.
AUTHOR
Jeffrey Thalhammer <thaljef@cpan.org>
COPYRIGHT
Copyright (c) 2006 Jeffrey Thalhammer
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.