File Coverage

blib/lib/YAML/Loader/Base.pm
Criterion Covered Total %
statement 7 8 87.5
branch 6 6 100.0
condition 5 6 83.3
subroutine 2 3 66.6
pod 0 2 0.0
total 20 25 80.0


line stmt bran cond sub pod time code
1             package YAML::Loader::Base;
2              
3 36     36   228 use YAML::Mo;
  36         61  
  36         198  
4              
5             has load_code => default => sub {0};
6             has preserve => default => sub {0};
7             has stream => default => sub {''};
8             has document => default => sub {0};
9             has line => default => sub {0};
10             has documents => default => sub {[]};
11             has lines => default => sub {[]};
12             has eos => default => sub {0};
13             has done => default => sub {0};
14             has anchor2node => default => sub {{}};
15             has level => default => sub {0};
16             has offset => default => sub {[]};
17             has preface => default => sub {''};
18             has content => default => sub {''};
19             has indent => default => sub {0};
20             has major_version => default => sub {0};
21             has minor_version => default => sub {0};
22             has inline => default => sub {''};
23             has numify => default => sub {0};
24             has zero_indent => default => sub {[]};
25              
26             sub set_global_options {
27 321     321 0 444 my $self = shift;
28 321 100 66     1358 $self->load_code($YAML::LoadCode || $YAML::UseCode)
      100        
29             if defined $YAML::LoadCode or defined $YAML::UseCode;
30 321 100       604 $self->preserve($YAML::Preserve) if defined $YAML::Preserve;
31 321 100       700 $self->numify($YAML::Numify) if defined $YAML::Numify;
32             }
33              
34             sub load {
35 0     0 0   die 'load() not implemented in this class.';
36             }
37              
38             1;