Modified source files and compiled any and armel versions of packages
[pkg-perl] / deb-src / libperl-critic-perl / libperl-critic-perl-1.088 / lib / Perl / Critic / PolicyParameter / Behavior.pm
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) $
4 #   $Author: clonezone $
5 # $Revision: 2489 $
6 ##############################################################################
7
8 package Perl::Critic::PolicyParameter::Behavior;
9
10 use 5.006001;
11 use strict;
12 use warnings;
13
14 use Perl::Critic::Utils qw{ :characters };
15
16 our $VERSION = '1.088';
17
18 #-----------------------------------------------------------------------------
19
20 sub new {
21     my $class = shift;
22
23     return bless {}, $class;
24 }
25
26 #-----------------------------------------------------------------------------
27
28 sub initialize_parameter {
29     my ($self, $parameter, $specification) = @_;
30
31     return;
32 }
33
34 #-----------------------------------------------------------------------------
35
36 sub generate_parameter_description {
37     my ($self, $parameter) = @_;
38
39     return $parameter->_get_description_with_trailing_period();
40 }
41
42 #-----------------------------------------------------------------------------
43
44 1;
45
46 __END__
47
48 #-----------------------------------------------------------------------------
49
50 =pod
51
52 =for stopwords
53
54 =head1 NAME
55
56 Perl::Critic::PolicyParameter::Behavior - Default type-specific actions for a parameter.
57
58
59 =head1 DESCRIPTION
60
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.
65
66 All subclasses have singleton instances held onto by
67 L<Perl::Critic::PolicyParameter>.
68
69
70 =head1 METHODS
71
72 =over
73
74 =item C<initialize_parameter( $parameter, $specification )>
75
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
79 subclass.
80
81 =item C<generate_parameter_description( $parameter )>
82
83 Create a description of the parameter, based upon the description on
84 the parameter itself, but enhancing it with information from this
85 behavior.
86
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
89 lines.
90
91 =back
92
93
94 =head1 AUTHOR
95
96 Elliot Shank <perl@galumph.com>
97
98 =head1 COPYRIGHT
99
100 Copyright (c) 2006-2008 Elliot Shank.  All rights reserved.
101
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.
105
106 =cut
107
108 # Local Variables:
109 #   mode: cperl
110 #   cperl-indent-level: 4
111 #   fill-column: 78
112 #   indent-tabs-mode: nil
113 #   c-indentation-style: bsd
114 # End:
115 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :