Parser/YAML.pm untested

filter: Statementstmt 0.0% 0 / 28 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 44 CC 3 SCAR 16.1
CC
3
Cov
0%
raw_data
12.0
new
2.0
DESTROY
2.0
CRAP 5.0
1 package CPAN::Testers::WWW::Reports::Parser::YAML;
2  
3 use strict;
4 use warnings;
5  
6 use vars qw($VERSION);
7 $VERSION = '0.05';
8  
9 #----------------------------------------------------------------------------
10 # Library Modules
11  
12 use YAML::XS qw(Load LoadFile);
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__