YAML/API.pm

filter: Statementstmt 44.4% 8 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 2 / 4 Podpod 0.0% 0 / 2 totaltotal 41.6% 10 / 24 CC 1 SCAR 4.1
CC
1
Cov
44%
new
2.0
load
2.0
BEGIN
1.0
CRAP 1.5
« YAML.pm ↑ Summary YAML/Dumper.pm »
1 package YAML::API;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 our $VERSION = '1.23_002';
6  
7 sub new {
8 0 ▶ my ($class, %args) = @_;
Subroutine new: not called CC=1 SCAR=6.9
Pod undocumented
9 0 return bless { %args }, $class;
10 }
11  
12 sub load {
13 0 ▶ my ($self, $input) = @_;
Subroutine load: not called CC=1 SCAR=6.9
Pod undocumented
14 0 require YAML::Perl::Loader;
15 0 require YAML::PP::Parser;
16 0 require YAML::Perl::Reader;
17 0 my $reader = YAML::Perl::Reader->new(
18 input => $input
19 );
20 0 my $parser = YAML::PP::Parser->new(
21 reader => $reader,
22 );
23 0 my $loader = YAML::Perl::Loader->new(
24 parser => $parser,
25 );
26 0 return $loader->load;
27 }
28  
29 1 1;
« YAML.pm ↑ Summary YAML/Dumper.pm »