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