line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Geo::TigerLine::Record; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
4
|
1
|
|
|
1
|
|
5
|
use vars qw($VERSION); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
194
|
|
5
|
|
|
|
|
|
|
$VERSION = '0.01'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=pod |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Geo::TigerLine::Record - Superclass for all TIGER/Line record classes. |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 SYNOPSIS |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
package Geo::TigerLine::Record::42; |
17
|
|
|
|
|
|
|
use base qw(Geo::TigerLine::Record); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
$record = __PACKAGE__->new(\%fields); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 DESCRIPTION |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
From this class all the specific TIGER/Line record classes inherit. |
25
|
|
|
|
|
|
|
It provides some of the basic methods common to all records. |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
You shouldn't be here. |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head2 Methods |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=over 4 |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=item B |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
$record = __PACKAGE__->new(\%fields); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
A simple constructor. Each field is passed through its accessor and |
38
|
|
|
|
|
|
|
sanity checked. |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=cut |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
#'# |
43
|
|
|
|
|
|
|
sub new { |
44
|
0
|
|
|
0
|
1
|
|
my($proto, $fields) = @_; |
45
|
0
|
|
0
|
|
|
|
my($class) = ref $proto || $proto; |
46
|
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
my $self = []; |
48
|
0
|
|
|
|
|
|
bless $self, $class; |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
while( my($k,$v) = each %$fields ) { |
51
|
0
|
|
|
|
|
|
$self->$k($v); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
0
|
|
|
|
|
|
warn "inside ", __PACKAGE__, "->new = $self\n"; |
55
|
|
|
|
|
|
|
|
56
|
0
|
|
|
|
|
|
return $self; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=pod |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=back |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 AUTHOR |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Michael G Schwern |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 SEE ALSO |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
L |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=cut |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
1; |