line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Gedcom::Date::Phrase; |
2
|
|
|
|
|
|
|
|
3
|
7
|
|
|
7
|
|
34
|
use strict; |
|
7
|
|
|
|
|
13
|
|
|
7
|
|
|
|
|
233
|
|
4
|
|
|
|
|
|
|
|
5
|
7
|
|
|
7
|
|
35
|
use vars qw($VERSION @ISA); |
|
7
|
|
|
|
|
10
|
|
|
7
|
|
|
|
|
465
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.06'; |
8
|
|
|
|
|
|
|
@ISA = qw/Gedcom::Date/; |
9
|
|
|
|
|
|
|
|
10
|
7
|
|
|
7
|
|
83
|
use Gedcom::Date; |
|
7
|
|
|
|
|
12
|
|
|
7
|
|
|
|
|
1970
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub parse { |
13
|
3
|
|
|
3
|
1
|
9
|
my $class = shift; |
14
|
3
|
|
|
|
|
8
|
my ($str) = @_; |
15
|
|
|
|
|
|
|
|
16
|
3
|
50
|
|
|
|
20
|
my ($phrase) = $str =~ /^\((.*)\)$/ |
17
|
|
|
|
|
|
|
or return; |
18
|
|
|
|
|
|
|
|
19
|
3
|
|
|
|
|
15
|
my $self = bless { |
20
|
|
|
|
|
|
|
phrase => $phrase |
21
|
|
|
|
|
|
|
}, $class; |
22
|
|
|
|
|
|
|
|
23
|
3
|
|
|
|
|
186
|
return $self; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub gedcom { |
27
|
2
|
|
|
2
|
1
|
470
|
my $self = shift; |
28
|
|
|
|
|
|
|
|
29
|
2
|
50
|
|
|
|
11
|
if (!defined $self->{gedcom}) { |
30
|
2
|
|
|
|
|
10
|
$self->{gedcom} = "($self->{phrase})"; |
31
|
|
|
|
|
|
|
} |
32
|
2
|
|
|
|
|
10
|
$self->{gedcom}; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub earliest { |
36
|
0
|
|
|
0
|
1
|
0
|
return DateTime::Infinite::Past->new; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub latest { |
40
|
0
|
|
|
0
|
1
|
0
|
return DateTime::Infinite::Future->new; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub sort_date { |
44
|
0
|
|
|
0
|
1
|
0
|
return '????-??-??'; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub as_text { |
48
|
3
|
|
|
3
|
1
|
3294
|
my ($self, $lang) = @_; |
49
|
|
|
|
|
|
|
|
50
|
3
|
|
|
|
|
27
|
return "($self->{phrase})"; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
__END__ |