Parser/YAML.pm

filter: Statementstmt 83.3% 10 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 87.5% 14 / 16 CC 1 SCAR 0.7
CC
1
Cov
83%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« Parser/JSON.pm ↑ Summary
1 package CPAN::Testers::WWW::Reports::Parser::YAML;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use vars qw($VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 $VERSION = '0.06';
8  
9 #----------------------------------------------------------------------------
10 # Library Modules
11  
12 0 ▶use YAML::XS qw(Load LoadFile);
Subroutine BEGIN: called CC=1 SCAR=2.6
13  
14 #----------------------------------------------------------------------------
15 # Variables
16  
17 #----------------------------------------------------------------------------
18 # The Application Programming Interface
19  
20 sub new {
21 my $class = shift;
22 my $self = {};
23 bless $self, $class;
24 return $self;
25 }
26  
27 sub DESTROY {
28 my $self = shift;
29 }
30  
31 # full data set methods
32  
33 sub register {
34 my $self = shift;
35 my %hash = @_;
36 $self->{file} = $hash{file};
37 $self->{data} = $hash{data};
38 }
39  
40 sub raw_data {
41 my $self = shift;
42 if($self->{file}) {
43 seek($self->{file},0,0) if(ref $self->{file} eq 'GLOB');
44 return LoadFile($self->{file});
45 }
46 return Load($self->{data});
47 }
48  
49 q{ Kein Zurück für dich };
50  
51 __END__
« Parser/JSON.pm ↑ Summary