1 ##############################################################################
2 # $URL: http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/lib/Perl/Critic/PolicyParameter/Behavior.pm $
3 # $Date: 2008-07-03 10:19:10 -0500 (Thu, 03 Jul 2008) $
6 ##############################################################################
8 package Perl::Critic::PolicyParameter::Behavior;
14 use Perl::Critic::Utils qw{ :characters };
16 our $VERSION = '1.088';
18 #-----------------------------------------------------------------------------
23 return bless {}, $class;
26 #-----------------------------------------------------------------------------
28 sub initialize_parameter {
29 my ($self, $parameter, $specification) = @_;
34 #-----------------------------------------------------------------------------
36 sub generate_parameter_description {
37 my ($self, $parameter) = @_;
39 return $parameter->_get_description_with_trailing_period();
42 #-----------------------------------------------------------------------------
48 #-----------------------------------------------------------------------------
56 Perl::Critic::PolicyParameter::Behavior - Default type-specific actions for a parameter.
61 Provides a standard set of functionality for a
62 L<Perl::Critic::PolicyParameter> so that the developer of a policy
63 does not have to provide it her/himself. The developer can override
64 most of the functionality in the subclasses; these are just defaults.
66 All subclasses have singleton instances held onto by
67 L<Perl::Critic::PolicyParameter>.
74 =item C<initialize_parameter( $parameter, $specification )>
76 Plug in the functionality this behavior provides into the parameter,
77 based upon the configuration provided by the specification. The
78 configuration items looked for depends upon the specific behavior
81 =item C<generate_parameter_description( $parameter )>
83 Create a description of the parameter, based upon the description on
84 the parameter itself, but enhancing it with information from this
87 Note that this may return C<undef> if the parameter itself doesn't
88 have a description. Also, the returned value may include multiple
96 Elliot Shank <perl@galumph.com>
100 Copyright (c) 2006-2008 Elliot Shank. All rights reserved.
102 This program is free software; you can redistribute it and/or modify
103 it under the same terms as Perl itself. The full text of this license
104 can be found in the LICENSE file included with this module.
110 # cperl-indent-level: 4
112 # indent-tabs-mode: nil
113 # c-indentation-style: bsd
115 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :