blib/lib/Valiemon/Attributes/Ref.pm

filter: Statementstmt 100% 22 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 0.0% 0 / 2 totaltotal 93.7% 30 / 32 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Valiemon/ValidationError.pm ↑ Summary Build »
1 package Valiemon::Attributes::Ref;
2 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 5 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 5 ▶use parent qw(Valiemon::Attributes);
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 5 ▶use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 34 ▶sub attr_name { '$ref' }
Subroutine attr_name: called CC=1 SCAR=0.0
Pod undocumented
10  
11 sub is_valid {
12 51 ▶ my ($class, $context, $schema, $data) = @_;
Subroutine is_valid: called CC=1 SCAR=0.0
Pod undocumented
13 51 my $ref = $schema->{'$ref'};
14 51 my $sub_schema = $context->rv->resolve_ref($ref);
15  
16 $context->in_attr($class, sub {
17 34 ▶ $context->sub_validator($sub_schema)->validate($data, $context);
Subroutine __ANON__: called CC=1 SCAR=0.0
18 34 });
19 }
20  
21 5 1;
« blib/lib/Valiemon/ValidationError.pm ↑ Summary Build »