line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Gedcom::Date::Phrase; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
23
|
use strict; |
|
6
|
|
|
|
|
6
|
|
|
6
|
|
|
|
|
166
|
|
4
|
|
|
|
|
|
|
|
5
|
6
|
|
|
6
|
|
22
|
use vars qw($VERSION @ISA); |
|
6
|
|
|
|
|
6
|
|
|
6
|
|
|
|
|
331
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.10'; |
8
|
|
|
|
|
|
|
@ISA = qw/Gedcom::Date/; |
9
|
|
|
|
|
|
|
|
10
|
6
|
|
|
6
|
|
34
|
use Gedcom::Date; |
|
6
|
|
|
|
|
5
|
|
|
6
|
|
|
|
|
1384
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub parse { |
13
|
3
|
|
|
3
|
1
|
8
|
my $class = shift; |
14
|
3
|
|
|
|
|
6
|
my ($str) = @_; |
15
|
|
|
|
|
|
|
|
16
|
3
|
50
|
|
|
|
16
|
my ($phrase) = $str =~ /^\((.*)\)$/ |
17
|
|
|
|
|
|
|
or return; |
18
|
|
|
|
|
|
|
|
19
|
3
|
|
|
|
|
12
|
my $self = bless { |
20
|
|
|
|
|
|
|
phrase => $phrase |
21
|
|
|
|
|
|
|
}, $class; |
22
|
|
|
|
|
|
|
|
23
|
3
|
|
|
|
|
103
|
return $self; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub gedcom { |
27
|
2
|
|
|
2
|
1
|
291
|
my $self = shift; |
28
|
|
|
|
|
|
|
|
29
|
2
|
50
|
|
|
|
6
|
if (!defined $self->{gedcom}) { |
30
|
2
|
|
|
|
|
6
|
$self->{gedcom} = "($self->{phrase})"; |
31
|
|
|
|
|
|
|
} |
32
|
2
|
|
|
|
|
6
|
$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
|
1287
|
my ($self, $lang) = @_; |
49
|
|
|
|
|
|
|
|
50
|
3
|
|
|
|
|
14
|
return "($self->{phrase})"; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
__END__ |