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
|
|
20
|
use strict; |
|
5
|
|
|
|
|
5
|
|
|
5
|
|
|
|
|
138
|
|
8
|
5
|
|
|
5
|
|
18
|
use warnings; |
|
5
|
|
|
|
|
6
|
|
|
5
|
|
|
|
|
133
|
|
9
|
5
|
|
|
5
|
|
21
|
use vars qw( @ISA $DEBUG ); |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
1143
|
|
10
|
|
|
|
|
|
|
$DEBUG = 0; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub new { |
13
|
3
|
|
|
3
|
0
|
5
|
my $class = shift; |
14
|
3
|
|
50
|
|
|
9
|
my $self = shift || {}; |
15
|
3
|
|
50
|
|
|
14
|
$self->{record_sep} ||= "\n"; |
16
|
|
|
|
|
|
|
### $self->{slurp_mode} = 1 unless defined $self->{slurp_mode}; |
17
|
3
|
|
|
|
|
10
|
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
|
16
|
sub storage_type { undef } |
24
|
2
|
|
|
2
|
0
|
4
|
sub init_parser { undef } |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub write_fields { |
27
|
6
|
|
|
6
|
0
|
6
|
my $self = shift; |
28
|
6
|
|
|
|
|
9
|
my @ary = @_; |
29
|
6
|
|
|
|
|
13
|
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
|
|
|
|
|
|
|
|