AnyData/Format/Base.pm

filter: Statementstmt 83.3% 20 / 24 Branchbran n/a Conditioncond 50.0% 2 / 4 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 70.0% 7 / 10 Podpod 0.0% 0 / 6 totaltotal 63.0% 29 / 46 CC 3 SCAR 5.3
CC
3
Cov
79%
new
3.1
get_data
2.0
read_fields
2.0
CRAP 1.7
« AnyData/Format/Tab.pm ↑ Summary
1 #########################################################
2 package AnyData::Format::Base;
3 #########################################################
4 # AnyData driver for plain text files
5 # copyright (c) 2000, Jeff Zucker <jeff@vpservices.com>
6 #########################################################
7 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 5 ▶use vars qw( @ISA $DEBUG );
Subroutine BEGIN: called CC=1 SCAR=0.0
10 5 $DEBUG = 0;
11  
12 3 ▶sub new {
Subroutine new: called CC=3 SCAR=11.4
Pod undocumented
13 3 my $class = shift;
14 3 ▶ my $self = shift || {};
Condition50%1/2
shift() || {}
l!l
30
MC/DC0%0/1
shift() || {}
shift()
Truth table50%1/2
A
A= shift()
Aresult
11
00
15 3 ▶ $self->{record_sep} ||= "\n";
Condition50%1/2
$self->{"record_sep"} ||= "\n"
l!l
03
MC/DC0%0/1
$self->{"record_sep"} ||= "\n"
$self->{"record_sep"}
Truth table50%1/2
A
A= $self->{"record_sep"}
Aresult
11
00
16 ### $self->{slurp_mode} = 1 unless defined $self->{slurp_mode};
17 3 return bless $self, $class;
18 }
19 0 ▶sub DESTROY {
Subroutine DESTROY: not called CC=1 SCAR=0.0
20 # print "PARSER DESTROYED"
21 }
22 0 ▶sub get_data { undef }
Subroutine get_data: not called CC=1 SCAR=6.9
Pod undocumented
23 3 ▶sub storage_type { undef }
Subroutine storage_type: called CC=1 SCAR=0.0
Pod undocumented
24 2 ▶sub init_parser { undef }
Subroutine init_parser: called CC=1 SCAR=0.0
Pod undocumented
25  
26 6 ▶sub write_fields {
Subroutine write_fields: called CC=1 SCAR=0.0
Pod undocumented
27 6 my $self = shift;
28 6 my @ary = @_;
29 6 return \@ary;
30 }
31 0 ▶sub read_fields {
Subroutine read_fields: not called CC=1 SCAR=6.9
Pod undocumented
32 0 my $self = shift;
33 0 my $aryref = shift;
34 0 return @$aryref;
35 }
36 5 1;
37  
« AnyData/Format/Tab.pm ↑ Summary