| 1 | =head1 NAME | ||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||
| 3 | HTML::Tested::Value - Base class for most HTML::Tested widgets. | ||||||||||||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||||||||||||
| 5 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||
| 7 | This class provides the most basic HTML::Tested widget - simple value to be | ||||||||||||||||||||||||||||||||||||||||||
| 8 | output in the template. | ||||||||||||||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||||||||||||||
| 10 | =head1 METHODS | ||||||||||||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||||||||||||
| 12 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||||||||||||||
| 14 | 21 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 15 | 21 | ▶ | use warnings FATAL => 'all'; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||||||||||||||||
| 17 | package HTML::Tested::Value; | ||||||||||||||||||||||||||||||||||||||||||
| 18 | 21 | ▶ | use HTML::Entities; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 19 | 21 | ▶ | use HTML::Tested::Seal; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 20 | 21 | ▶ | use Carp; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 21 | 21 | ▶ | use Data::Dumper; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||||||||||||||
| 23 | 2 | ▶ | sub setup_datetime_option { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
setup_datetime_option: called CC=4 SCAR=14.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 24 | 2 | my ($self, $dto, $opts) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 25 | 2 | ▶ | $opts ||= $self->options; | ||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
$opts ||= $self->options
MC/DC0%0/2
$opts ||= $self->options
$opts
$self->options
Truth table33%1/3
A ||= B
A= $optsB= $self->options
| |||||||||||||||||||||||||||||||||||||||||||
| 26 | 2 | ▶ | eval "use DateTime::Format::Strptime"; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 27 | 2 | ▶ | confess "Unable to use DateTime::Format::Strptime: $@" if $@; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 28 | 2 | ▶ | $dto = { pattern => $dto } unless ref($dto); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 29 | 2 | $opts->{is_datetime} = DateTime::Format::Strptime->new($dto); | |||||||||||||||||||||||||||||||||||||||||
| 30 | 2 | $self->compile; | |||||||||||||||||||||||||||||||||||||||||
| 31 | } | ||||||||||||||||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||||||||||||||||
| 33 | =head2 $class->new($parent, $name, %opts) | ||||||||||||||||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||||||||||||||||
| 35 | Creates new L<HTML::Tested::Value> named C<$name> at parent class C<$parent>. | ||||||||||||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||||||||||||
| 37 | C<%opts> is a hash containing various options changing behaviour of this widget. | ||||||||||||||||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||||||||||||||||
| 39 | See OPTIONS section for description of available options. | ||||||||||||||||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||||||||||||||||
| 41 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 42 | 109 | ▶ | sub new { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=4 SCAR=13.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 43 | 109 | my ($class, $parent, $name, %opts) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 44 | 109 | my $self = bless({ name => $name, _options => \%opts | |||||||||||||||||||||||||||||||||||||||||
| 45 | , constraints => [], validators => [] }, $class); | ||||||||||||||||||||||||||||||||||||||||||
| 46 | 109 | ▶ | my $cs = $opts{constraints} || []; | ||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$opts{'constraints'} || []
MC/DC100%1/1
$opts{'constraints'} || []
$opts{'constraints'}
Truth table100%2/2
A
A= $opts{'constraints'}
| |||||||||||||||||||||||||||||||||||||||||||
| 47 | 109 | $self->push_constraint($_) for @$cs; | |||||||||||||||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||||||||||||||||
| 49 | 109 | my $dto = $self->options->{is_datetime}; | |||||||||||||||||||||||||||||||||||||||||
| 50 | 109 | ▶ | $self->setup_datetime_option($dto) if $dto; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 51 | 109 | return $self; | |||||||||||||||||||||||||||||||||||||||||
| 52 | } | ||||||||||||||||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||||||||||||||||
| 54 | 1165 | ▶ | sub _get_option { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_get_option: called CC=4 SCAR=13.9
| |||||||||||||||||||||||||||||||||||||||||||
| 55 | 1165 | my ($self, $caller, $wname, $opname) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 56 | 1165 | ▶ | if ($caller && ref($caller)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$caller and ref $caller
MC/DC100%2/2
$caller and ref $caller
$caller
ref $caller
Truth table100%3/3
A and B
A= $callerB= ref $caller
| |||||||||||||||||||||||||||||||||||||||||||
| 57 | 514 | my $n = "__ht__$wname\_$opname"; | |||||||||||||||||||||||||||||||||||||||||
| 58 | 514 | ▶ | return $caller->{$n} if exists $caller->{$n}; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 59 | } | ||||||||||||||||||||||||||||||||||||||||||
| 60 | 1154 | return $self->options->{$opname}; | |||||||||||||||||||||||||||||||||||||||||
| 61 | } | ||||||||||||||||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||||||||||||||||
| 63 | =head2 $widget->name | ||||||||||||||||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||||||||||||||||
| 65 | Returns the name of the widget. | ||||||||||||||||||||||||||||||||||||||||||
| 66 | |||||||||||||||||||||||||||||||||||||||||||
| 67 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 68 | 960 | ▶ | sub name { return shift()->{name}; } | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
name: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||||||||||||||||
| 70 | =head2 $widget->options | ||||||||||||||||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||||||||||||||||
| 72 | Returns hash of options assigned to this widget. See OPTIONS section for | ||||||||||||||||||||||||||||||||||||||||||
| 73 | description of available options. | ||||||||||||||||||||||||||||||||||||||||||
| 74 | |||||||||||||||||||||||||||||||||||||||||||
| 75 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 76 | 1749 | ▶ | sub options { return shift()->{_options}; } | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
options: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||||||||||||||||
| 78 | =head2 $widget->value_to_string($name, $val, $caller, $stash) | ||||||||||||||||||||||||||||||||||||||||||
| 79 | |||||||||||||||||||||||||||||||||||||||||||
| 80 | This function is called from C<render> to return final string which will be | ||||||||||||||||||||||||||||||||||||||||||
| 81 | rendered into stash. For HTML::Tested::Value it simply returns $val. | ||||||||||||||||||||||||||||||||||||||||||
| 82 | |||||||||||||||||||||||||||||||||||||||||||
| 83 | C<$caller> is the object calling this function. C<$stash> is read-only hash of | ||||||||||||||||||||||||||||||||||||||||||
| 84 | the values accummulated so far. | ||||||||||||||||||||||||||||||||||||||||||
| 85 | |||||||||||||||||||||||||||||||||||||||||||
| 86 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 87 | 92 | ▶ | sub value_to_string { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
value_to_string: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 88 | 92 | my ($self, $name, $val) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 89 | 92 | return $val; | |||||||||||||||||||||||||||||||||||||||||
| 90 | } | ||||||||||||||||||||||||||||||||||||||||||
| 91 | |||||||||||||||||||||||||||||||||||||||||||
| 92 | =head2 $widget->encode_value($val) | ||||||||||||||||||||||||||||||||||||||||||
| 93 | |||||||||||||||||||||||||||||||||||||||||||
| 94 | Uses HTML::Entities to encode $val. | ||||||||||||||||||||||||||||||||||||||||||
| 95 | |||||||||||||||||||||||||||||||||||||||||||
| 96 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 97 | 260 | ▶ | sub encode_value { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
encode_value: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 98 | 260 | my ($self, $val) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 99 | 260 | ▶ | confess ref($self) . "->" . $self->name . ": Non scalar value $val\n" | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 100 | . Dumper($val) if ref($val); | ||||||||||||||||||||||||||||||||||||||||||
| 101 | 260 | return encode_entities($val, '<>&"' . "'"); | |||||||||||||||||||||||||||||||||||||||||
| 102 | } | ||||||||||||||||||||||||||||||||||||||||||
| 103 | |||||||||||||||||||||||||||||||||||||||||||
| 104 | 39 | ▶ | sub get_default_value { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_default_value: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 105 | 39 | my ($self, $caller, $n) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 106 | 39 | ▶ | my $func = $caller->{"__$n\_defval"} || $self->{__defval}; | ||||||||||||||||||||||||||||||||||||||||
|
Condition66%2/3
$$caller{"__${n}_defval"} || $self->{'__defval'}
MC/DC0%0/2
$$caller{"__${n}_defval"} || $self->{'__defval'}
$$caller{"__${n}_defval"}
$self->{'__defval'}
Truth table66%2/3
A || B
A= $$caller{"__${n}_defval"}B= $self->{'__defval'}
| |||||||||||||||||||||||||||||||||||||||||||
| 107 | 39 | return $func->($self, $n, $caller); | |||||||||||||||||||||||||||||||||||||||||
| 108 | } | ||||||||||||||||||||||||||||||||||||||||||
| 109 | |||||||||||||||||||||||||||||||||||||||||||
| 110 | =head2 $widget->get_value($caller, $id) | ||||||||||||||||||||||||||||||||||||||||||
| 111 | |||||||||||||||||||||||||||||||||||||||||||
| 112 | It is called from $widget->render to get the value to render. If the value | ||||||||||||||||||||||||||||||||||||||||||
| 113 | is C<undef> C<get_default_value> will be used to get default value for the | ||||||||||||||||||||||||||||||||||||||||||
| 114 | widget. | ||||||||||||||||||||||||||||||||||||||||||
| 115 | |||||||||||||||||||||||||||||||||||||||||||
| 116 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 117 | 227 | ▶ | sub get_value { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_value: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 118 | 227 | my ($self, $caller, $id, $n) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 119 | 227 | ▶ | return $caller->{$n} // $self->get_default_value($caller, $n); | ||||||||||||||||||||||||||||||||||||||||
|
Condition100%3/3
$caller->{$n} // $self->get_default_value($caller, $n)
MC/DC100%2/2
$caller->{$n} // $self->get_default_value($caller, $n)
$caller->{$n}
$self->get_default_value($caller, $n)
Truth table100%3/3
A // B
A= $caller->{$n}B= $self->get_default_value($caller, $n)
| |||||||||||||||||||||||||||||||||||||||||||
| 120 | } | ||||||||||||||||||||||||||||||||||||||||||
| 121 | |||||||||||||||||||||||||||||||||||||||||||
| 122 | =head2 $widget->seal_value($value, $caller) | ||||||||||||||||||||||||||||||||||||||||||
| 123 | |||||||||||||||||||||||||||||||||||||||||||
| 124 | If C<is_sealed> option is used, this function is called from $widget->render to | ||||||||||||||||||||||||||||||||||||||||||
| 125 | seal the value before putting it to stash. See HTML::Tested::Seal for sealing | ||||||||||||||||||||||||||||||||||||||||||
| 126 | description. | ||||||||||||||||||||||||||||||||||||||||||
| 127 | |||||||||||||||||||||||||||||||||||||||||||
| 128 | This function maintains cache of sealed values in caller. Thus promising that | ||||||||||||||||||||||||||||||||||||||||||
| 129 | the same value will map to the same id during request. | ||||||||||||||||||||||||||||||||||||||||||
| 130 | |||||||||||||||||||||||||||||||||||||||||||
| 131 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 132 | 60 | ▶ | sub seal_value { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
seal_value: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 133 | 60 | my ($self, $val, $caller) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 134 | 60 | return HTML::Tested::Seal->instance->encrypt($val); | |||||||||||||||||||||||||||||||||||||||||
| 135 | } | ||||||||||||||||||||||||||||||||||||||||||
| 136 | |||||||||||||||||||||||||||||||||||||||||||
| 137 | 169 | ▶ | sub transform_value { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
transform_value: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 138 | 169 | my ($self, $caller, $val, $n) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 139 | 169 | ▶ | my $func = $caller->{"__$n\_transform"} || $self->{__transform}; | ||||||||||||||||||||||||||||||||||||||||
|
Condition66%2/3
$$caller{"__${n}_transform"} || $self->{'__transform'}
MC/DC0%0/2
$$caller{"__${n}_transform"} || $self->{'__transform'}
$$caller{"__${n}_transform"}
$self->{'__transform'}
Truth table66%2/3
A || B
A= $$caller{"__${n}_transform"}B= $self->{'__transform'}
| |||||||||||||||||||||||||||||||||||||||||||
| 140 | 169 | return $func->($self, $val, $caller, $n); | |||||||||||||||||||||||||||||||||||||||||
| 141 | } | ||||||||||||||||||||||||||||||||||||||||||
| 142 | |||||||||||||||||||||||||||||||||||||||||||
| 143 | 210 | ▶ | sub prepare_value { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
prepare_value: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 144 | 210 | my ($self, $caller, $id, $n) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 145 | 210 | my $val = $self->get_value($caller, $id, $n); | |||||||||||||||||||||||||||||||||||||||||
| 146 | 210 | ▶ | return undef unless defined($val); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 147 | 205 | return $self->transform_value($caller, $val, $n); | |||||||||||||||||||||||||||||||||||||||||
| 148 | } | ||||||||||||||||||||||||||||||||||||||||||
| 149 | |||||||||||||||||||||||||||||||||||||||||||
| 150 | 210 | ▶ | sub _render_i { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_render_i: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||
| 151 | 210 | my ($self, $caller, $stash, $id, $n) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 152 | 210 | my $val = $self->prepare_value($caller, $id, $n); | |||||||||||||||||||||||||||||||||||||||||
| 153 | 210 | ▶ | return unless defined($val); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 154 | 205 | return $self->value_to_string($id, $val, $caller, $stash); | |||||||||||||||||||||||||||||||||||||||||
| 155 | } | ||||||||||||||||||||||||||||||||||||||||||
| 156 | |||||||||||||||||||||||||||||||||||||||||||
| 157 | =head2 $widget->render($caller, $stash, $id, $name) | ||||||||||||||||||||||||||||||||||||||||||
| 158 | |||||||||||||||||||||||||||||||||||||||||||
| 159 | Renders widget into $stash. For HTML::Tested::Value it essentially means | ||||||||||||||||||||||||||||||||||||||||||
| 160 | assigning $stash->{ $name } with $widget->get_value. | ||||||||||||||||||||||||||||||||||||||||||
| 161 | |||||||||||||||||||||||||||||||||||||||||||
| 162 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 163 | 214 | ▶ | sub render { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
render: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 164 | 214 | my ($self, $caller, $stash, $id, $n) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 165 | 214 | ▶ | my $func = $caller->{"__$n\_render"} || $self->{__render}; | ||||||||||||||||||||||||||||||||||||||||
|
Condition66%2/3
$$caller{"__${n}_render"} || $self->{'__render'}
MC/DC0%0/2
$$caller{"__${n}_render"} || $self->{'__render'}
$$caller{"__${n}_render"}
$self->{'__render'}
Truth table66%2/3
A || B
A= $$caller{"__${n}_render"}B= $self->{'__render'}
| |||||||||||||||||||||||||||||||||||||||||||
| 166 | 214 | my $res = $func->($self, $caller, $stash, $id, $n); | |||||||||||||||||||||||||||||||||||||||||
| 167 | 214 | ▶ | $stash->{$n} = $res if defined($res); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 168 | } | ||||||||||||||||||||||||||||||||||||||||||
| 169 | |||||||||||||||||||||||||||||||||||||||||||
| 170 | 87 | ▶ | sub bless_from_tree { return $_[1]; } | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
bless_from_tree: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 171 | |||||||||||||||||||||||||||||||||||||||||||
| 172 | =head2 $widget->push_constraint($constraint) | ||||||||||||||||||||||||||||||||||||||||||
| 173 | |||||||||||||||||||||||||||||||||||||||||||
| 174 | C<$constraint> should be ARRAY reference with the following format: | ||||||||||||||||||||||||||||||||||||||||||
| 175 | |||||||||||||||||||||||||||||||||||||||||||
| 176 | [ TYPE, OP, COOKIE ] | ||||||||||||||||||||||||||||||||||||||||||
| 177 | |||||||||||||||||||||||||||||||||||||||||||
| 178 | where C<TYPE> is type of the constraint, C<OP> is the operation to be done on | ||||||||||||||||||||||||||||||||||||||||||
| 179 | the constraint and cookie is optional method for the application to recognize | ||||||||||||||||||||||||||||||||||||||||||
| 180 | specific constraint. | ||||||||||||||||||||||||||||||||||||||||||
| 181 | |||||||||||||||||||||||||||||||||||||||||||
| 182 | Available types are: | ||||||||||||||||||||||||||||||||||||||||||
| 183 | |||||||||||||||||||||||||||||||||||||||||||
| 184 | =over | ||||||||||||||||||||||||||||||||||||||||||
| 185 | |||||||||||||||||||||||||||||||||||||||||||
| 186 | =item C<regexp> | ||||||||||||||||||||||||||||||||||||||||||
| 187 | |||||||||||||||||||||||||||||||||||||||||||
| 188 | With OP being regexp string (or C<qr//> value) (e.g. [ regexp => '\d+' ] or [ | ||||||||||||||||||||||||||||||||||||||||||
| 189 | regexp => qr/\d+/ ]). | ||||||||||||||||||||||||||||||||||||||||||
| 190 | |||||||||||||||||||||||||||||||||||||||||||
| 191 | =item C<defined> | ||||||||||||||||||||||||||||||||||||||||||
| 192 | |||||||||||||||||||||||||||||||||||||||||||
| 193 | Ensures that the value is defined. C<OP> doesn't matter here | ||||||||||||||||||||||||||||||||||||||||||
| 194 | (e.g. [ defined => '' ]). | ||||||||||||||||||||||||||||||||||||||||||
| 195 | |||||||||||||||||||||||||||||||||||||||||||
| 196 | =item C<any user-defined string> | ||||||||||||||||||||||||||||||||||||||||||
| 197 | |||||||||||||||||||||||||||||||||||||||||||
| 198 | Any user defined constraint - second parameter should be function to call. | ||||||||||||||||||||||||||||||||||||||||||
| 199 | It gets the value and the caller as the arguments. | ||||||||||||||||||||||||||||||||||||||||||
| 200 | |||||||||||||||||||||||||||||||||||||||||||
| 201 | For example [ 'my_foo' => sub { my ($v, $caller) = @_; return is_ok? } ]. | ||||||||||||||||||||||||||||||||||||||||||
| 202 | |||||||||||||||||||||||||||||||||||||||||||
| 203 | =back | ||||||||||||||||||||||||||||||||||||||||||
| 204 | |||||||||||||||||||||||||||||||||||||||||||
| 205 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 206 | 9 | ▶ | sub push_constraint { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
push_constraint: called CC=7 SCAR=20.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 207 | 9 | my ($self, $c) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 208 | 9 | my $func; | |||||||||||||||||||||||||||||||||||||||||
| 209 | 9 | push @{ $self->{constraints} }, $c; | |||||||||||||||||||||||||||||||||||||||||
| 210 | 9 | ▶ | confess "Constraint should be of [ TYPE, OP ] format" | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$c and ref $c eq "ARRAY"
MC/DC0%0/2
$c and ref $c eq "ARRAY"
$c
ref $c eq "ARRAY"
Truth table33%1/3
A and B
A= $cB= ref $c eq "ARRAY"
| |||||||||||||||||||||||||||||||||||||||||||
| 211 | unless ($c && ref($c) eq 'ARRAY'); | ||||||||||||||||||||||||||||||||||||||||||
| 212 | 9 | ▶ | if ($c->[0] eq 'regexp') { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 213 | 6 | my $rexp = $c->[1]; | |||||||||||||||||||||||||||||||||||||||||
| 214 | 19 | ▶ | $func = sub { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||
| 215 | 19 | my $v = shift; | |||||||||||||||||||||||||||||||||||||||||
| 216 | 19 | ▶ | return defined($v) ? $v =~ /$rexp/ : undef; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 217 | 6 | }; | |||||||||||||||||||||||||||||||||||||||||
| 218 | } elsif ($c->[0] eq 'defined') { | ||||||||||||||||||||||||||||||||||||||||||
| 219 | 1 | ▶ | $func = sub { return defined($_[0]); }; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 220 | } elsif ($c->[1]) { | ||||||||||||||||||||||||||||||||||||||||||
| 221 | 2 | $func = $c->[1]; | |||||||||||||||||||||||||||||||||||||||||
| 222 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 223 | 0 | confess "Unknown type " . $c->[0] . " found!\n"; | |||||||||||||||||||||||||||||||||||||||||
| 224 | } | ||||||||||||||||||||||||||||||||||||||||||
| 225 | 9 | ▶ | push @{ $self->{validators} }, $func if $func; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 226 | } | ||||||||||||||||||||||||||||||||||||||||||
| 227 | |||||||||||||||||||||||||||||||||||||||||||
| 228 | =head2 $widget->validate($value, $caller) | ||||||||||||||||||||||||||||||||||||||||||
| 229 | |||||||||||||||||||||||||||||||||||||||||||
| 230 | Validate value returning list of failed constraints in the format specified | ||||||||||||||||||||||||||||||||||||||||||
| 231 | above. | ||||||||||||||||||||||||||||||||||||||||||
| 232 | |||||||||||||||||||||||||||||||||||||||||||
| 233 | I.e. the C<$value> is "constraint-clean" when C<validate> returns empty list. | ||||||||||||||||||||||||||||||||||||||||||
| 234 | |||||||||||||||||||||||||||||||||||||||||||
| 235 | Validate is disabled if C<no_validate> widget option is set. | ||||||||||||||||||||||||||||||||||||||||||
| 236 | |||||||||||||||||||||||||||||||||||||||||||
| 237 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 238 | 33 | ▶ | sub validate { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
validate: called CC=7 SCAR=19.5
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 239 | 33 | my ($self, $caller) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 240 | 33 | my $n = $self->name; | |||||||||||||||||||||||||||||||||||||||||
| 241 | 33 | my $val = $caller->$n; | |||||||||||||||||||||||||||||||||||||||||
| 242 | 33 | ▶ | return () if $caller->ht_get_widget_option($n, "no_validate"); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 243 | 31 | ▶ | return ([ $n, 'integer' ]) if (defined($val) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%6/6
defined $val and $caller->ht_get_widget_option($n, "is_integer") and not $val =~ /^\d+$/
defined $val and $caller->ht_get_widget_option($n, "is_integer")
MC/DC100%3/3
defined $val and $caller->ht_get_widget_option($n, "is_integer") and not $val =~ /^\d+$/
defined $val
$caller->ht_get_widget_option($n, "is_integer")
not $val =~ /^\d+$/
Truth table100%4/4
A and B and not(C)
A= defined $valB= $caller->ht_get_widget_option($n, "is_integer")C= not $val =~ /^\d+$/
| |||||||||||||||||||||||||||||||||||||||||||
| 244 | && $caller->ht_get_widget_option($n, "is_integer") | ||||||||||||||||||||||||||||||||||||||||||
| 245 | && $val !~ /^\d+$/); | ||||||||||||||||||||||||||||||||||||||||||
| 246 | 29 | my $vs = $self->{validators}; | |||||||||||||||||||||||||||||||||||||||||
| 247 | 29 | my @res; | |||||||||||||||||||||||||||||||||||||||||
| 248 | 29 | ▶ | for (my $i = 0; $i < @$vs; $i++) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 249 | 28 | ▶ | next if $vs->[$i]->($val, $caller); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 250 | 12 | push @res, [ $n, @{ $self->{constraints}->[$i] } ]; | |||||||||||||||||||||||||||||||||||||||||
| 251 | } | ||||||||||||||||||||||||||||||||||||||||||
| 252 | 29 | return @res; | |||||||||||||||||||||||||||||||||||||||||
| 253 | } | ||||||||||||||||||||||||||||||||||||||||||
| 254 | |||||||||||||||||||||||||||||||||||||||||||
| 255 | 5 | ▶ | sub unseal_value { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
unseal_value: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 256 | 5 | my ($self, $val, $caller) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 257 | 5 | return HTML::Tested::Seal->instance->decrypt($val); | |||||||||||||||||||||||||||||||||||||||||
| 258 | } | ||||||||||||||||||||||||||||||||||||||||||
| 259 | |||||||||||||||||||||||||||||||||||||||||||
| 260 | 1 | ▶ | sub merge_one_value { shift()->absorb_one_value(@_); } | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
merge_one_value: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 261 | |||||||||||||||||||||||||||||||||||||||||||
| 262 | =head2 $widget->absorb_one_value($parent, $val, @path) | ||||||||||||||||||||||||||||||||||||||||||
| 263 | |||||||||||||||||||||||||||||||||||||||||||
| 264 | Parses C<$val> and puts the result into C<$parent> object. C<@path> is used for | ||||||||||||||||||||||||||||||||||||||||||
| 265 | widgets aggregating other widgets (such as C<HTML::Tested::List>). | ||||||||||||||||||||||||||||||||||||||||||
| 266 | |||||||||||||||||||||||||||||||||||||||||||
| 267 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 268 | 132 | ▶ | sub absorb_one_value { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
absorb_one_value: called CC=7 SCAR=19.5
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 269 | 132 | my ($self, $root, $val, @path) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 270 | 132 | ▶ | return if $self->options->{is_trusted}; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 271 | $val = $self->unseal_value($val, $root) | ||||||||||||||||||||||||||||||||||||||||||
| 272 | 131 | ▶ | if $self->options->{"is_sealed"}; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 273 | 131 | my $dtfs = $self->options->{"is_datetime"}; | |||||||||||||||||||||||||||||||||||||||||
| 274 | 131 | ▶ | $val = $dtfs->parse_datetime($val) if $dtfs; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 275 | $root->{ $self->name } = (defined($val) && $val eq "" | ||||||||||||||||||||||||||||||||||||||||||
| 276 | 131 | ▶ | && !$self->options->{keep_empty_string}) ? undef : $val; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%6/6
defined $val and $val eq "" and not $self->options->{"keep_empty_string"}
defined $val and $val eq ""
MC/DC100%3/3
defined $val and $val eq "" and not $self->options->{"keep_empty_string"}
defined $val
$val eq ""
not $self->options->{"keep_empty_string"}
Truth table100%4/4
A and B and not(C)
A= defined $valB= $val eq ""C= not $self->options->{"keep_empty_string"}
| |||||||||||||||||||||||||||||||||||||||||||
| 277 | } | ||||||||||||||||||||||||||||||||||||||||||
| 278 | |||||||||||||||||||||||||||||||||||||||||||
| 279 | 369 | ▶ | sub _set_callback { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_set_callback: called CC=5 SCAR=16.1
| |||||||||||||||||||||||||||||||||||||||||||
| 280 | 369 | my ($self, $caller, $n, $what, $func) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 281 | 369 | ▶ | my $obj = ($caller && ref($caller)) ? $caller : $self; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$caller and ref $caller
MC/DC100%2/2
$caller and ref $caller
$caller
ref $caller
Truth table100%3/3
A and B
A= $callerB= ref $caller
| |||||||||||||||||||||||||||||||||||||||||||
| 282 | 369 | ▶ | my $key = ($caller && ref($caller)) ? "__$n\_$what" : "__$what"; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$caller and ref $caller
MC/DC100%2/2
$caller and ref $caller
$caller
ref $caller
Truth table100%3/3
A and B
A= $callerB= ref $caller
| |||||||||||||||||||||||||||||||||||||||||||
| 283 | 369 | $obj->{$key} = $func; | |||||||||||||||||||||||||||||||||||||||||
| 284 | } | ||||||||||||||||||||||||||||||||||||||||||
| 285 | |||||||||||||||||||||||||||||||||||||||||||
| 286 | 6 | ▶ | sub _trans_datetime { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_trans_datetime: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||
| 287 | 6 | my ($self, $dtfs, $val, $caller, $n) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 288 | 6 | ▶ | return $dtfs->format_datetime($val) if $val; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 289 | } | ||||||||||||||||||||||||||||||||||||||||||
| 290 | |||||||||||||||||||||||||||||||||||||||||||
| 291 | 123 | ▶ | sub compile { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
compile: called CC=8 SCAR=20.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 292 | 123 | my ($self, $caller) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 293 | 123 | my $n = $self->name; | |||||||||||||||||||||||||||||||||||||||||
| 294 | 123 | my $trans = $self->can('encode_value'); | |||||||||||||||||||||||||||||||||||||||||
| 295 | 123 | my $func = $self->can('_render_i'); | |||||||||||||||||||||||||||||||||||||||||
| 296 | 123 | ▶ | my $defval = sub { return '' }; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 297 | 123 | ▶ | if ($self->_get_option($caller, $n, 'is_disabled')) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 4 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 298 | 3 | $func = $defval; | |||||||||||||||||||||||||||||||||||||||||
| 299 | } elsif (my $dtfs = $self->_get_option($caller, $n, "is_datetime")) { | ||||||||||||||||||||||||||||||||||||||||||
| 300 | 4 | ▶ | $trans = sub { return shift()->_trans_datetime($dtfs, @_); }; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 301 | } elsif ($self->_get_option($caller, $n, "is_sealed")) { | ||||||||||||||||||||||||||||||||||||||||||
| 302 | 44 | ▶ | $trans = sub { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 303 | 44 | my $this = shift; | |||||||||||||||||||||||||||||||||||||||||
| 304 | 44 | my $val = shift; | |||||||||||||||||||||||||||||||||||||||||
| 305 | 44 | $val = $this->seal_value($val, @_); | |||||||||||||||||||||||||||||||||||||||||
| 306 | 44 | return $this->encode_value($val, @_); | |||||||||||||||||||||||||||||||||||||||||
| 307 | 17 | }; | |||||||||||||||||||||||||||||||||||||||||
| 308 | } elsif ($self->_get_option($caller, $n, "is_trusted")) { | ||||||||||||||||||||||||||||||||||||||||||
| 309 | 3 | ▶ | $trans = sub { return $_[1]; }; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 310 | } | ||||||||||||||||||||||||||||||||||||||||||
| 311 | |||||||||||||||||||||||||||||||||||||||||||
| 312 | 123 | my $dval = $self->_get_option($caller, $n, "default_value"); | |||||||||||||||||||||||||||||||||||||||||
| 313 | 123 | ▶ | if (defined($dval)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 314 | 16 | ▶ | $defval = ref($dval) eq 'CODE' ? $dval : sub { return $dval; }; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 315 | } elsif ($self->_get_option($caller, $n, "skip_undef")) { | ||||||||||||||||||||||||||||||||||||||||||
| 316 | 3 | ▶ | $defval = sub { return undef; }; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 317 | } | ||||||||||||||||||||||||||||||||||||||||||
| 318 | |||||||||||||||||||||||||||||||||||||||||||
| 319 | 123 | $self->_set_callback($caller, $n, 'render', $func); | |||||||||||||||||||||||||||||||||||||||||
| 320 | 123 | $self->_set_callback($caller, $n, 'transform', $trans); | |||||||||||||||||||||||||||||||||||||||||
| 321 | 123 | $self->_set_callback($caller, $n, 'defval', $defval); | |||||||||||||||||||||||||||||||||||||||||
| 322 | } | ||||||||||||||||||||||||||||||||||||||||||
| 323 | |||||||||||||||||||||||||||||||||||||||||||
| 324 | 21 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 325 | |||||||||||||||||||||||||||||||||||||||||||
| 326 | =head1 OPTIONS | ||||||||||||||||||||||||||||||||||||||||||
| 327 | |||||||||||||||||||||||||||||||||||||||||||
| 328 | Options can be used to customize widget behaviour. Each widget is free to | ||||||||||||||||||||||||||||||||||||||||||
| 329 | define its own options. They can be set per class or per object using | ||||||||||||||||||||||||||||||||||||||||||
| 330 | C<ht_set_widget_option>. The options can be retrieved using | ||||||||||||||||||||||||||||||||||||||||||
| 331 | C<ht_get_widget_option>. | ||||||||||||||||||||||||||||||||||||||||||
| 332 | |||||||||||||||||||||||||||||||||||||||||||
| 333 | C<HTML::Tested::Value> defines the following options: | ||||||||||||||||||||||||||||||||||||||||||
| 334 | |||||||||||||||||||||||||||||||||||||||||||
| 335 | =over | ||||||||||||||||||||||||||||||||||||||||||
| 336 | |||||||||||||||||||||||||||||||||||||||||||
| 337 | =item is_sealed | ||||||||||||||||||||||||||||||||||||||||||
| 338 | |||||||||||||||||||||||||||||||||||||||||||
| 339 | The widget value is encrypted before rendering it. The value is decrypted from | ||||||||||||||||||||||||||||||||||||||||||
| 340 | the request parameters in transparent fashion. | ||||||||||||||||||||||||||||||||||||||||||
| 341 | |||||||||||||||||||||||||||||||||||||||||||
| 342 | =item is_disabled | ||||||||||||||||||||||||||||||||||||||||||
| 343 | |||||||||||||||||||||||||||||||||||||||||||
| 344 | The widget is disabled: it is rendered as blank value. | ||||||||||||||||||||||||||||||||||||||||||
| 345 | |||||||||||||||||||||||||||||||||||||||||||
| 346 | =item default_value | ||||||||||||||||||||||||||||||||||||||||||
| 347 | |||||||||||||||||||||||||||||||||||||||||||
| 348 | Default value for the widget. It is rendered if current widget value is | ||||||||||||||||||||||||||||||||||||||||||
| 349 | C<undef>. | ||||||||||||||||||||||||||||||||||||||||||
| 350 | |||||||||||||||||||||||||||||||||||||||||||
| 351 | =item skip_undef | ||||||||||||||||||||||||||||||||||||||||||
| 352 | |||||||||||||||||||||||||||||||||||||||||||
| 353 | Normally, if widget value is C<undef>, the widget is rendered as blank value. | ||||||||||||||||||||||||||||||||||||||||||
| 354 | When this option is set the widget will not appear in the stash at all. | ||||||||||||||||||||||||||||||||||||||||||
| 355 | |||||||||||||||||||||||||||||||||||||||||||
| 356 | =item constraints | ||||||||||||||||||||||||||||||||||||||||||
| 357 | |||||||||||||||||||||||||||||||||||||||||||
| 358 | Array reference containing widget value constraints. See C<push_constraint> | ||||||||||||||||||||||||||||||||||||||||||
| 359 | documentation for the individual entry format. | ||||||||||||||||||||||||||||||||||||||||||
| 360 | |||||||||||||||||||||||||||||||||||||||||||
| 361 | =item is_trusted | ||||||||||||||||||||||||||||||||||||||||||
| 362 | |||||||||||||||||||||||||||||||||||||||||||
| 363 | Do not perform the escaping of special characters on the value. Improperly | ||||||||||||||||||||||||||||||||||||||||||
| 364 | setting this option may result in XSS security breach. | ||||||||||||||||||||||||||||||||||||||||||
| 365 | |||||||||||||||||||||||||||||||||||||||||||
| 366 | =item is_integer | ||||||||||||||||||||||||||||||||||||||||||
| 367 | |||||||||||||||||||||||||||||||||||||||||||
| 368 | Ensures that the value is integer. | ||||||||||||||||||||||||||||||||||||||||||
| 369 | |||||||||||||||||||||||||||||||||||||||||||
| 370 | =back | ||||||||||||||||||||||||||||||||||||||||||
| 371 | |||||||||||||||||||||||||||||||||||||||||||
| 372 | =head1 AUTHOR | ||||||||||||||||||||||||||||||||||||||||||
| 373 | |||||||||||||||||||||||||||||||||||||||||||
| 374 | Boris Sukholitko (boriss@gmail.com) | ||||||||||||||||||||||||||||||||||||||||||
| 375 | |||||||||||||||||||||||||||||||||||||||||||
| 376 | =head1 COPYRIGHT | ||||||||||||||||||||||||||||||||||||||||||
| 377 | |||||||||||||||||||||||||||||||||||||||||||
| 378 | This program is free software; you can redistribute | ||||||||||||||||||||||||||||||||||||||||||
| 379 | it and/or modify it under the same terms as Perl itself. | ||||||||||||||||||||||||||||||||||||||||||
| 380 | |||||||||||||||||||||||||||||||||||||||||||
| 381 | The full text of the license can be found in the | ||||||||||||||||||||||||||||||||||||||||||
| 382 | LICENSE file included with this module. | ||||||||||||||||||||||||||||||||||||||||||
| 383 | |||||||||||||||||||||||||||||||||||||||||||
| 384 | |||||||||||||||||||||||||||||||||||||||||||
| 385 | =head1 SEE ALSO | ||||||||||||||||||||||||||||||||||||||||||
| 386 | |||||||||||||||||||||||||||||||||||||||||||
| 387 | HTML::Tested | ||||||||||||||||||||||||||||||||||||||||||
| 388 | |||||||||||||||||||||||||||||||||||||||||||
| 389 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 390 | |||||||||||||||||||||||||||||||||||||||||||