File Coverage

blib/lib/YAML/Old/Loader/Base.pm
Criterion Covered Total %
statement 7 8 87.5
branch 6 6 100.0
condition 3 6 50.0
subroutine 2 3 66.6
pod 0 2 0.0
total 18 25 72.0


line stmt bran cond sub pod time code
1             package YAML::Old::Loader::Base;
2              
3 32     32   179 use YAML::Old::Mo;
  32         66  
  32         162  
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              
25             sub set_global_options {
26 279     279 0 486 my $self = shift;
27 279 100 33     1549 $self->load_code($YAML::LoadCode || $YAML::UseCode)
      66        
28             if defined $YAML::LoadCode or defined $YAML::UseCode;
29 279 100       738 $self->preserve($YAML::Preserve) if defined $YAML::Preserve;
30 279 100       809 $self->numify($YAML::Numify) if defined $YAML::Numify;
31             }
32              
33             sub load {
34 0     0 0   die 'load() not implemented in this class.';
35             }
36              
37             1;