line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl::ToPerl6::Exception::Configuration::Option::Transformer::ParameterValue; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
13
|
use 5.006001; |
|
1
|
|
|
|
|
3
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
17
|
|
5
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
18
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
4
|
use Readonly; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
75
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
5
|
use Perl::ToPerl6::Utils qw{ :characters }; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
48
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
use Exception::Class ( |
14
|
1
|
|
|
|
|
8
|
'Perl::ToPerl6::Exception::Configuration::Option::Transformer::ParameterValue' => { |
15
|
|
|
|
|
|
|
isa => 'Perl::ToPerl6::Exception::Configuration::Option::Transformer', |
16
|
|
|
|
|
|
|
description => 'A problem with the value of a parameter for a transformer.', |
17
|
|
|
|
|
|
|
alias => 'throw_transformer_value', |
18
|
|
|
|
|
|
|
}, |
19
|
1
|
|
|
1
|
|
229
|
); |
|
1
|
|
|
|
|
2
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
Readonly::Array our @EXPORT_OK => qw< throw_transformer_value >; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub full_message { |
28
|
0
|
|
|
0
|
1
|
|
my ( $self ) = @_; |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
my $source = $self->source(); |
31
|
0
|
0
|
|
|
|
|
if ($source) { |
32
|
0
|
|
|
|
|
|
$source = qq{ found in "$source"}; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
else { |
35
|
0
|
|
|
|
|
|
$source = $EMPTY; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
my $transformer = $self->transformer(); |
39
|
0
|
|
|
|
|
|
my $option_name = $self->option_name(); |
40
|
0
|
0
|
|
|
|
|
my $option_value = |
41
|
|
|
|
|
|
|
defined $self->option_value() |
42
|
|
|
|
|
|
|
? $DQUOTE . $self->option_value() . $DQUOTE |
43
|
|
|
|
|
|
|
: '<undef>'; |
44
|
0
|
|
0
|
|
|
|
my $message_suffix = $self->message_suffix() || $EMPTY; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
return |
47
|
0
|
|
|
|
|
|
qq{The value for the $transformer "$option_name" option } |
48
|
|
|
|
|
|
|
. qq{($option_value)$source $message_suffix}; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
__END__ |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=pod |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=for stopwords |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 NAME |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Perl::ToPerl6::Exception::Configuration::Option::Transformer::ParameterValue - A problem with the value of a parameter for a transformer. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 DESCRIPTION |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
A representation of a problem found with the value of a parameter for |
69
|
|
|
|
|
|
|
a L<Perl::ToPerl6::Transformer|Perl::ToPerl6::Transformer>, whether from a |
70
|
|
|
|
|
|
|
F<.perlmogrifyrc>, another profile file, or command line. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 INTERFACE SUPPORT |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
This is considered to be a public class. Any changes to its interface |
76
|
|
|
|
|
|
|
will go through a deprecation cycle. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 CLASS METHODS |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=over |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=item C<< throw( transformer => $transformer, option_name => $option_name, option_value => $option_value, source => $source, message_suffix => $message_suffix ) >> |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
See L<Exception::Class/"throw">. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=item C<< new( transformer => $transformer, option_name => $option_name, option_value => $option_value, source => $source, message_suffix => $message_suffix ) >> |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
See L<Exception::Class/"new">. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=back |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 METHODS |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=over |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=item C<full_message()> |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
Provide a standard message for transformer parameter value problems. See |
103
|
|
|
|
|
|
|
L<Exception::Class/"full_message">. |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=back |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head1 AUTHOR |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
Elliot Shank <perl@galumph.com> |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=head1 COPYRIGHT |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
Copyright (c) 2007-2011 Elliot Shank. |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify |
118
|
|
|
|
|
|
|
it under the same terms as Perl itself. The full text of this license |
119
|
|
|
|
|
|
|
can be found in the LICENSE file included with this module. |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=cut |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
# Local Variables: |
124
|
|
|
|
|
|
|
# mode: cperl |
125
|
|
|
|
|
|
|
# cperl-indent-level: 4 |
126
|
|
|
|
|
|
|
# fill-column: 78 |
127
|
|
|
|
|
|
|
# indent-tabs-mode: nil |
128
|
|
|
|
|
|
|
# c-indentation-style: bsd |
129
|
|
|
|
|
|
|
# End: |
130
|
|
|
|
|
|
|
# ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround : |