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