File Coverage

blib/lib/AnyData/Format/Base.pm
Criterion Covered Total %
statement 18 23 78.2
branch n/a
condition 2 4 50.0
subroutine 7 10 70.0
pod 0 6 0.0
total 27 43 62.7


line stmt bran cond sub pod time code
1             #########################################################
2             package AnyData::Format::Base;
3             #########################################################
4             # AnyData driver for plain text files
5             # copyright (c) 2000, Jeff Zucker
6             #########################################################
7 5     5   37 use strict;
  5         9  
  5         156  
8 5     5   29 use warnings;
  5         8  
  5         171  
9 5     5   40 use vars qw( @ISA $DEBUG );
  5         9  
  5         1429  
10             $DEBUG = 0;
11              
12             sub new {
13 3     3 0 7 my $class = shift;
14 3   50     11 my $self = shift || {};
15 3   50     15 $self->{record_sep} ||= "\n";
16             ### $self->{slurp_mode} = 1 unless defined $self->{slurp_mode};
17 3         14 return bless $self, $class;
18             }
19 0     0   0 sub DESTROY {
20             # print "PARSER DESTROYED"
21             }
22 0     0 0 0 sub get_data { undef }
23 3     3 0 25 sub storage_type { undef }
24 2     2 0 7 sub init_parser { undef }
25              
26             sub write_fields {
27 6     6 0 7 my $self = shift;
28 6         16 my @ary = @_;
29 6         19 return \@ary;
30             }
31             sub read_fields {
32 0     0 0   my $self = shift;
33 0           my $aryref = shift;
34 0           return @$aryref;
35             }
36             1;
37