| 1 | package Valiemon::Attributes::Maximum; | ||||||||||||
| 2 | 3 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 3 | 3 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 3 | ▶ | use utf8; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | 3 | ▶ | use parent qw(Valiemon::Attributes); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | |||||||||||||
| 7 | 22 | ▶ | sub attr_name { 'maximum' } | ||||||||||
|
Subroutine
attr_name: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 8 | |||||||||||||
| 9 | sub is_valid { | ||||||||||||
| 10 | 22 | ▶ | my ($class, $context, $schema, $data) = @_; | ||||||||||
|
Subroutine
is_valid: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 11 | 22 | my $max = $schema->{maximum}; | |||||||||||
| 12 | 22 | ▶ | my $exclusive = $schema->{exclusiveMaximum} || 0; | ||||||||||
|
Condition100%2/2
$schema->{'exclusiveMaximum'} || 0
MC/DC100%1/1
$schema->{'exclusiveMaximum'} || 0
$schema->{'exclusiveMaximum'}
Truth table100%2/2
A
A= $schema->{'exclusiveMaximum'}
| |||||||||||||
| 13 | $context->in_attr($class, sub { | ||||||||||||
| 14 | 3 | ▶ | no warnings 'numeric'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 15 | 22 | ▶ | $exclusive ? $data < $max : $data <= $max; | ||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
Branch: 1 branch
| |||||||||||||
| 16 | 22 | }); | |||||||||||
| 17 | } | ||||||||||||
| 18 | |||||||||||||
| 19 | 3 | 1; | |||||||||||