line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl::ToPerl6::TransformerParameter::Behavior; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
13
|
use 5.006001; |
|
1
|
|
|
|
|
4
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
17
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
22
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
4
|
use Perl::ToPerl6::Utils qw{ :characters }; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
58
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new { |
12
|
5
|
|
|
5
|
0
|
6
|
my $class = shift; |
13
|
|
|
|
|
|
|
|
14
|
5
|
|
|
|
|
34
|
return bless {}, $class; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub initialize_parameter { |
20
|
0
|
|
|
0
|
1
|
|
my ($self, $parameter, $specification) = @_; |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
return; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub generate_parameter_description { |
28
|
0
|
|
|
0
|
1
|
|
my ($self, $parameter) = @_; |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
return $parameter->_get_description_with_trailing_period(); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=pod |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=for stopwords |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 NAME |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Perl::ToPerl6::TransformerParameter::Behavior - Default type-specific actions for a parameter. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 DESCRIPTION |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Provides a standard set of functionality for a |
53
|
|
|
|
|
|
|
L<Perl::ToPerl6::TransformerParameter|Perl::ToPerl6::TransformerParameter> so that |
54
|
|
|
|
|
|
|
the developer of a transformer does not have to provide it her/himself. |
55
|
|
|
|
|
|
|
The developer can override most of the functionality in the |
56
|
|
|
|
|
|
|
subclasses; these are just defaults. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
All subclasses have singleton instances held onto by |
59
|
|
|
|
|
|
|
L<Perl::ToPerl6::TransformerParameter|Perl::ToPerl6::TransformerParameter>. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 INTERFACE SUPPORT |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
This is considered to be a non-public class. Its interface is subject |
65
|
|
|
|
|
|
|
to change without notice. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 METHODS |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=over |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=item C<initialize_parameter( $parameter, $specification )> |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Plug in the functionality this behavior provides into the parameter, |
75
|
|
|
|
|
|
|
based upon the configuration provided by the specification. The |
76
|
|
|
|
|
|
|
configuration items looked for depends upon the specific behavior |
77
|
|
|
|
|
|
|
subclass. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=item C<generate_parameter_description( $parameter )> |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Create a description of the parameter, based upon the description on |
82
|
|
|
|
|
|
|
the parameter itself, but enhancing it with information from this |
83
|
|
|
|
|
|
|
behavior. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Note that this may return C<undef> if the parameter itself doesn't |
86
|
|
|
|
|
|
|
have a description. Also, the returned value may include multiple |
87
|
|
|
|
|
|
|
lines. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=back |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 AUTHOR |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Elliot Shank <perl@galumph.com> |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 COPYRIGHT |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Copyright (c) 2006-2011 Elliot Shank. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify |
101
|
|
|
|
|
|
|
it under the same terms as Perl itself. The full text of this license |
102
|
|
|
|
|
|
|
can be found in the LICENSE file included with this module. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=cut |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
# Local Variables: |
107
|
|
|
|
|
|
|
# mode: cperl |
108
|
|
|
|
|
|
|
# cperl-indent-level: 4 |
109
|
|
|
|
|
|
|
# fill-column: 78 |
110
|
|
|
|
|
|
|
# indent-tabs-mode: nil |
111
|
|
|
|
|
|
|
# c-indentation-style: bsd |
112
|
|
|
|
|
|
|
# End: |
113
|
|
|
|
|
|
|
# ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround : |