« lib/Perl/Critic/Exception/Configuration/Option/Global/ParameterValue.pm
↑ Summary
lib/Perl/Critic/Policy/InputOutput/RequireCheckedClose.pm »
| 1 | package Perl::Critic::PolicyParameter; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 40 | ▶ | use 5.010001; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 40 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 40 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | 40 | ▶ | use Readonly; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | 40 | ▶ | use Exporter 'import'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 9 | |||||||||||||||||||||
| 10 | 40 | Readonly::Array our @EXPORT_OK => qw{ $NO_DESCRIPTION_AVAILABLE }; | |||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | 40 | ▶ | use String::Format qw{ stringf }; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | use Perl::Critic::Exception::Fatal::PolicyDefinition | ||||||||||||||||||||
| 15 | 40 | ▶ | qw{ throw_policy_definition }; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 16 | 40 | ▶ | use Perl::Critic::PolicyParameter::Behavior; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 17 | 40 | ▶ | use Perl::Critic::PolicyParameter::Behavior::Boolean; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 18 | 40 | ▶ | use Perl::Critic::PolicyParameter::Behavior::Enumeration; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 19 | 40 | ▶ | use Perl::Critic::PolicyParameter::Behavior::Integer; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 20 | 40 | ▶ | use Perl::Critic::PolicyParameter::Behavior::String; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 21 | 40 | ▶ | use Perl::Critic::PolicyParameter::Behavior::StringList; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 40 | ▶ | use Perl::Critic::Utils qw( :characters interpolate ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 24 | |||||||||||||||||||||
| 25 | 40 | our $VERSION = '1.156'; | |||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | 40 | Readonly::Scalar our $NO_DESCRIPTION_AVAILABLE => 'No description available.'; | |||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | #----------------------------------------------------------------------------- | ||||||||||||||||||||
| 30 | |||||||||||||||||||||
| 31 | # Grrr... one of the OO limitations of Perl: you can't put references to | ||||||||||||||||||||
| 32 | # subclases in a superclass (well, not nicely). This map and method belong | ||||||||||||||||||||
| 33 | # in Behavior.pm. | ||||||||||||||||||||
| 34 | 40 | Readonly::Hash my %BEHAVIORS => | |||||||||||||||||||
| 35 | ( | ||||||||||||||||||||
| 36 | 'boolean' => Perl::Critic::PolicyParameter::Behavior::Boolean->new(), | ||||||||||||||||||||
| 37 | 'enumeration' => Perl::Critic::PolicyParameter::Behavior::Enumeration->new(), | ||||||||||||||||||||
| 38 | 'integer' => Perl::Critic::PolicyParameter::Behavior::Integer->new(), | ||||||||||||||||||||
| 39 | 'string' => Perl::Critic::PolicyParameter::Behavior::String->new(), | ||||||||||||||||||||
| 40 | 'string list' => Perl::Critic::PolicyParameter::Behavior::StringList->new(), | ||||||||||||||||||||
| 41 | ); | ||||||||||||||||||||
| 42 | |||||||||||||||||||||
| 43 | 9835 | ▶ | sub _get_behavior_for_name { | ||||||||||||||||||
|
Subroutine
_get_behavior_for_name: called CC=2 SCAR=7.1
| |||||||||||||||||||||
| 44 | 9835 | my $behavior_name = shift; | |||||||||||||||||||
| 45 | |||||||||||||||||||||
| 46 | 9835 | ▶ | my $behavior = $BEHAVIORS{$behavior_name} | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 47 | or throw_policy_definition qq{There's no "$behavior_name" behavior.}; | ||||||||||||||||||||
| 48 | |||||||||||||||||||||
| 49 | 9835 | return $behavior; | |||||||||||||||||||
| 50 | } | ||||||||||||||||||||
| 51 | |||||||||||||||||||||
| 52 | #----------------------------------------------------------------------------- | ||||||||||||||||||||
| 53 | |||||||||||||||||||||
| 54 | 9835 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=5 SCAR=16.9
Pod
undocumented
| |||||||||||||||||||||
| 55 | 9835 | my ($class, $specification) = @_; | |||||||||||||||||||
| 56 | 9835 | my $self = bless {}, $class; | |||||||||||||||||||
| 57 | |||||||||||||||||||||
| 58 | 9835 | ▶ | defined $specification | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 59 | or throw_policy_definition | ||||||||||||||||||||
| 60 | 'Attempt to create a ', __PACKAGE__, ' without a specification.'; | ||||||||||||||||||||
| 61 | |||||||||||||||||||||
| 62 | 9835 | my $behavior_specification; | |||||||||||||||||||
| 63 | |||||||||||||||||||||
| 64 | 9835 | my $specification_type = ref $specification; | |||||||||||||||||||
| 65 | 9835 | ▶ | if ( not $specification_type ) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 66 | 0 | $self->{_name} = $specification; | |||||||||||||||||||
| 67 | |||||||||||||||||||||
| 68 | 0 | $behavior_specification = {}; | |||||||||||||||||||
| 69 | } else { | ||||||||||||||||||||
| 70 | 9835 | ▶ | $specification_type eq 'HASH' | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 71 | or throw_policy_definition | ||||||||||||||||||||
| 72 | 'Attempt to create a ', | ||||||||||||||||||||
| 73 | __PACKAGE__, | ||||||||||||||||||||
| 74 | " with a $specification_type as a specification.", | ||||||||||||||||||||
| 75 | ; | ||||||||||||||||||||
| 76 | |||||||||||||||||||||
| 77 | defined $specification->{name} | ||||||||||||||||||||
| 78 | 9835 | ▶ | or throw_policy_definition | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 79 | 'Attempt to create a ', __PACKAGE__, ' without a name.'; | ||||||||||||||||||||
| 80 | 9835 | $self->{_name} = $specification->{name}; | |||||||||||||||||||
| 81 | |||||||||||||||||||||
| 82 | 9835 | $behavior_specification = $specification; | |||||||||||||||||||
| 83 | } | ||||||||||||||||||||
| 84 | |||||||||||||||||||||
| 85 | 9835 | $self->_initialize_from_behavior($behavior_specification); | |||||||||||||||||||
| 86 | 9831 | $self->_finish_standard_initialization($behavior_specification); | |||||||||||||||||||
| 87 | |||||||||||||||||||||
| 88 | 9831 | return $self; | |||||||||||||||||||
| 89 | } | ||||||||||||||||||||
| 90 | |||||||||||||||||||||
| 91 | # See if the specification includes a Behavior name, and if so, let the | ||||||||||||||||||||
| 92 | # Behavior with that name plug in its implementations of parser, etc. | ||||||||||||||||||||
| 93 | 9835 | ▶ | sub _initialize_from_behavior { | ||||||||||||||||||
|
Subroutine
_initialize_from_behavior: called CC=2 SCAR=6.9
| |||||||||||||||||||||
| 94 | 9835 | my ($self, $specification) = @_; | |||||||||||||||||||
| 95 | |||||||||||||||||||||
| 96 | 9835 | my $behavior_name = $specification->{behavior}; | |||||||||||||||||||
| 97 | 9835 | my $behavior; | |||||||||||||||||||
| 98 | 9835 | ▶ | if ($behavior_name) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 99 | 8820 | $behavior = _get_behavior_for_name($behavior_name); | |||||||||||||||||||
| 100 | } else { | ||||||||||||||||||||
| 101 | 1015 | $behavior = _get_behavior_for_name('string'); | |||||||||||||||||||
| 102 | } | ||||||||||||||||||||
| 103 | |||||||||||||||||||||
| 104 | 9835 | $self->{_behavior} = $behavior; | |||||||||||||||||||
| 105 | 9835 | $self->{_behavior_values} = {}; | |||||||||||||||||||
| 106 | |||||||||||||||||||||
| 107 | 9835 | $behavior->initialize_parameter($self, $specification); | |||||||||||||||||||
| 108 | |||||||||||||||||||||
| 109 | 9831 | return; | |||||||||||||||||||
| 110 | } | ||||||||||||||||||||
| 111 | |||||||||||||||||||||
| 112 | # Grab the rest of the values out of the specification, including overrides | ||||||||||||||||||||
| 113 | # of what the Behavior specified. | ||||||||||||||||||||
| 114 | 9831 | ▶ | sub _finish_standard_initialization { | ||||||||||||||||||
|
Subroutine
_finish_standard_initialization: called CC=2 SCAR=7.1
| |||||||||||||||||||||
| 115 | 9831 | my ($self, $specification) = @_; | |||||||||||||||||||
| 116 | |||||||||||||||||||||
| 117 | my $description = | ||||||||||||||||||||
| 118 | 9831 | ▶ | $specification->{description} || $NO_DESCRIPTION_AVAILABLE; | ||||||||||||||||||
|
Condition33%1/3
$specification->{'description'} || $Perl::Critic::PolicyParameter::NO_DESCRIPTION_AVAILABLE
MC/DC0%0/2
$specification->{'description'} || $Perl::Critic::PolicyParameter::NO_DESCRIPTION_AVAILABLE
$specification->{'description'}
$Perl::Critic::PolicyParameter::NO_DESCRIPTION_AVAILABLE
Truth table33%1/3
A || B
A= $specification->{'description'}B= $Perl::Critic::PolicyParameter::NO_DESCRIPTION_AVAILABLE
| |||||||||||||||||||||
| 119 | 9831 | $self->_set_description($description); | |||||||||||||||||||
| 120 | 9831 | $self->_set_default_string($specification->{default_string}); | |||||||||||||||||||
| 121 | |||||||||||||||||||||
| 122 | 9831 | $self->_set_parser($specification->{parser}); | |||||||||||||||||||
| 123 | |||||||||||||||||||||
| 124 | 9831 | return; | |||||||||||||||||||
| 125 | } | ||||||||||||||||||||
| 126 | |||||||||||||||||||||
| 127 | #----------------------------------------------------------------------------- | ||||||||||||||||||||
| 128 | |||||||||||||||||||||
| 129 | 29058 | ▶ | sub get_name { | ||||||||||||||||||
|
Subroutine
get_name: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 130 | 29058 | my $self = shift; | |||||||||||||||||||
| 131 | |||||||||||||||||||||
| 132 | 29058 | return $self->{_name}; | |||||||||||||||||||
| 133 | } | ||||||||||||||||||||
| 134 | |||||||||||||||||||||
| 135 | #----------------------------------------------------------------------------- | ||||||||||||||||||||
| 136 | |||||||||||||||||||||
| 137 | 625 | ▶ | sub get_description { | ||||||||||||||||||
|
Subroutine
get_description: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 138 | 625 | my $self = shift; | |||||||||||||||||||
| 139 | |||||||||||||||||||||
| 140 | 625 | return $self->{_description}; | |||||||||||||||||||
| 141 | } | ||||||||||||||||||||
| 142 | |||||||||||||||||||||
| 143 | 9831 | ▶ | sub _set_description { | ||||||||||||||||||
|
Subroutine
_set_description: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 144 | 9831 | my ($self, $new_value) = @_; | |||||||||||||||||||
| 145 | |||||||||||||||||||||
| 146 | 9831 | ▶ | return if not defined $new_value; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 147 | 9831 | $self->{_description} = $new_value; | |||||||||||||||||||
| 148 | |||||||||||||||||||||
| 149 | 9831 | return; | |||||||||||||||||||
| 150 | } | ||||||||||||||||||||
| 151 | |||||||||||||||||||||
| 152 | 520 | ▶ | sub _get_description_with_trailing_period { | ||||||||||||||||||
|
Subroutine
_get_description_with_trailing_period: called CC=3 SCAR=11.2
| |||||||||||||||||||||
| 153 | 520 | my $self = shift; | |||||||||||||||||||
| 154 | |||||||||||||||||||||
| 155 | 520 | my $description = $self->get_description(); | |||||||||||||||||||
| 156 | 520 | ▶ | if ($description) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 157 | 520 | ▶ | if ( $PERIOD ne substr $description, ( length $description ) - 1 ) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 158 | 55 | $description .= $PERIOD; | |||||||||||||||||||
| 159 | } | ||||||||||||||||||||
| 160 | } else { | ||||||||||||||||||||
| 161 | 0 | $description = $EMPTY; | |||||||||||||||||||
| 162 | } | ||||||||||||||||||||
| 163 | |||||||||||||||||||||
| 164 | 520 | return $description; | |||||||||||||||||||
| 165 | } | ||||||||||||||||||||
| 166 | |||||||||||||||||||||
| 167 | #----------------------------------------------------------------------------- | ||||||||||||||||||||
| 168 | |||||||||||||||||||||
| 169 | 9366 | ▶ | sub get_default_string { | ||||||||||||||||||
|
Subroutine
get_default_string: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 170 | 9366 | my $self = shift; | |||||||||||||||||||
| 171 | |||||||||||||||||||||
| 172 | 9366 | return $self->{_default_string}; | |||||||||||||||||||
| 173 | } | ||||||||||||||||||||
| 174 | |||||||||||||||||||||
| 175 | 9831 | ▶ | sub _set_default_string { | ||||||||||||||||||
|
Subroutine
_set_default_string: called CC=2 SCAR=6.9
| |||||||||||||||||||||
| 176 | 9831 | my ($self, $new_value) = @_; | |||||||||||||||||||
| 177 | |||||||||||||||||||||
| 178 | 9831 | ▶ | return if not defined $new_value; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 179 | 9002 | $self->{_default_string} = $new_value; | |||||||||||||||||||
| 180 | |||||||||||||||||||||
| 181 | 9002 | return; | |||||||||||||||||||
| 182 | } | ||||||||||||||||||||
| 183 | |||||||||||||||||||||
| 184 | #----------------------------------------------------------------------------- | ||||||||||||||||||||
| 185 | |||||||||||||||||||||
| 186 | 520 | ▶ | sub _get_behavior { | ||||||||||||||||||
|
Subroutine
_get_behavior: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 187 | 520 | my $self = shift; | |||||||||||||||||||
| 188 | |||||||||||||||||||||
| 189 | 520 | return $self->{_behavior}; | |||||||||||||||||||
| 190 | } | ||||||||||||||||||||
| 191 | |||||||||||||||||||||
| 192 | 7229 | ▶ | sub _get_behavior_values { | ||||||||||||||||||
|
Subroutine
_get_behavior_values: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 193 | 7229 | my $self = shift; | |||||||||||||||||||
| 194 | |||||||||||||||||||||
| 195 | 7229 | return $self->{_behavior_values}; | |||||||||||||||||||
| 196 | } | ||||||||||||||||||||
| 197 | |||||||||||||||||||||
| 198 | #----------------------------------------------------------------------------- | ||||||||||||||||||||
| 199 | |||||||||||||||||||||
| 200 | 9765 | ▶ | sub _get_parser { | ||||||||||||||||||
|
Subroutine
_get_parser: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 201 | 9765 | my $self = shift; | |||||||||||||||||||
| 202 | |||||||||||||||||||||
| 203 | 9765 | return $self->{_parser}; | |||||||||||||||||||
| 204 | } | ||||||||||||||||||||
| 205 | |||||||||||||||||||||
| 206 | 19662 | ▶ | sub _set_parser { | ||||||||||||||||||
|
Subroutine
_set_parser: called CC=2 SCAR=6.9
| |||||||||||||||||||||
| 207 | 19662 | my ($self, $new_value) = @_; | |||||||||||||||||||
| 208 | |||||||||||||||||||||
| 209 | 19662 | ▶ | return if not defined $new_value; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 210 | 11027 | $self->{_parser} = $new_value; | |||||||||||||||||||
| 211 | |||||||||||||||||||||
| 212 | 11027 | return; | |||||||||||||||||||
| 213 | } | ||||||||||||||||||||
| 214 | |||||||||||||||||||||
| 215 | #----------------------------------------------------------------------------- | ||||||||||||||||||||
| 216 | |||||||||||||||||||||
| 217 | 9765 | ▶ | sub parse_and_validate_config_value { | ||||||||||||||||||
|
Subroutine
parse_and_validate_config_value: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||||||||||||
| 218 | 9765 | my ($self, $policy, $config) = @_; | |||||||||||||||||||
| 219 | |||||||||||||||||||||
| 220 | 9765 | my $config_string = $config->{$self->get_name()}; | |||||||||||||||||||
| 221 | |||||||||||||||||||||
| 222 | 9765 | my $parser = $self->_get_parser(); | |||||||||||||||||||
| 223 | 9765 | ▶ | if ($parser) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 224 | 9765 | $parser->($policy, $self, $config_string); | |||||||||||||||||||
| 225 | } | ||||||||||||||||||||
| 226 | |||||||||||||||||||||
| 227 | 9757 | return; | |||||||||||||||||||
| 228 | } | ||||||||||||||||||||
| 229 | |||||||||||||||||||||
| 230 | #----------------------------------------------------------------------------- | ||||||||||||||||||||
| 231 | |||||||||||||||||||||
| 232 | 520 | ▶ | sub generate_full_description { | ||||||||||||||||||
|
Subroutine
generate_full_description: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 233 | 520 | my ($self) = @_; | |||||||||||||||||||
| 234 | |||||||||||||||||||||
| 235 | 520 | return $self->_get_behavior()->generate_parameter_description($self); | |||||||||||||||||||
| 236 | } | ||||||||||||||||||||
| 237 | |||||||||||||||||||||
| 238 | #----------------------------------------------------------------------------- | ||||||||||||||||||||
| 239 | |||||||||||||||||||||
| 240 | 520 | ▶ | sub _generate_full_description { | ||||||||||||||||||
|
Subroutine
_generate_full_description: called CC=3 SCAR=11.6
| |||||||||||||||||||||
| 241 | 520 | my ($self, $prefix) = @_; | |||||||||||||||||||
| 242 | |||||||||||||||||||||
| 243 | 520 | my $description = $self->generate_full_description(); | |||||||||||||||||||
| 244 | |||||||||||||||||||||
| 245 | 520 | ▶ | if (not $description) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 246 | 0 | return $EMPTY; | |||||||||||||||||||
| 247 | } | ||||||||||||||||||||
| 248 | |||||||||||||||||||||
| 249 | 520 | ▶ | if ($prefix) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 250 | 520 | $description =~ s/ ^ /$prefix/xmsg; | |||||||||||||||||||
| 251 | } | ||||||||||||||||||||
| 252 | |||||||||||||||||||||
| 253 | 520 | return $description; | |||||||||||||||||||
| 254 | } | ||||||||||||||||||||
| 255 | |||||||||||||||||||||
| 256 | #----------------------------------------------------------------------------- | ||||||||||||||||||||
| 257 | |||||||||||||||||||||
| 258 | 520 | ▶ | sub to_formatted_string { | ||||||||||||||||||
|
Subroutine
to_formatted_string: called CC=1 SCAR=0.6
Pod
documented
| |||||||||||||||||||||
| 259 | 520 | my ($self, $format) = @_; | |||||||||||||||||||
| 260 | |||||||||||||||||||||
| 261 | my %specification = ( | ||||||||||||||||||||
| 262 | 520 | ▶ | n => sub { $self->get_name() }, | ||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 263 | 0 | ▶ | d => sub { $self->get_description() // $EMPTY }, | ||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Condition0%0/3
$self->get_description // $Perl::Critic::PolicyParameter::EMPTY
MC/DC0%0/2
$self->get_description // $Perl::Critic::PolicyParameter::EMPTY
$self->get_description
$Perl::Critic::PolicyParameter::EMPTY
Truth table0%0/3
A // B
A= $self->get_descriptionB= $Perl::Critic::PolicyParameter::EMPTY
| |||||||||||||||||||||
| 264 | 520 | ▶ | D => sub { $self->get_default_string() // $EMPTY }, | ||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.2
Condition66%2/3
$self->get_default_string // $Perl::Critic::PolicyParameter::EMPTY
MC/DC0%0/2
$self->get_default_string // $Perl::Critic::PolicyParameter::EMPTY
$self->get_default_string
$Perl::Critic::PolicyParameter::EMPTY
Truth table66%2/3
A // B
A= $self->get_default_stringB= $Perl::Critic::PolicyParameter::EMPTY
| |||||||||||||||||||||
| 265 | 520 | ▶ | f => sub { $self->_generate_full_description(@_) }, | ||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 266 | 520 | ); | |||||||||||||||||||
| 267 | |||||||||||||||||||||
| 268 | 520 | return stringf( interpolate($format), %specification ); | |||||||||||||||||||
| 269 | } | ||||||||||||||||||||
| 270 | |||||||||||||||||||||
| 271 | #----------------------------------------------------------------------------- | ||||||||||||||||||||
| 272 | |||||||||||||||||||||
| 273 | 40 | 1; | |||||||||||||||||||
| 274 | |||||||||||||||||||||
| 275 | __END__ | ||||||||||||||||||||