line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::Microformat::Element::hCard; |
2
|
3
|
|
|
3
|
|
3142
|
use warnings; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
125
|
|
3
|
3
|
|
|
3
|
|
100
|
use strict; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
98
|
|
4
|
3
|
|
|
3
|
|
13
|
use base 'Text::Microformat::Element'; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
547
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
__PACKAGE__->_init({ |
7
|
|
|
|
|
|
|
criteria => { |
8
|
|
|
|
|
|
|
class => 'vcard', |
9
|
|
|
|
|
|
|
}, |
10
|
|
|
|
|
|
|
schema => { |
11
|
|
|
|
|
|
|
fn => [], |
12
|
|
|
|
|
|
|
n => [qw/family-name given-name additional-name honorific-prefix honorific-suffix/], |
13
|
|
|
|
|
|
|
nickname => [], |
14
|
|
|
|
|
|
|
'sort-string' => [], |
15
|
|
|
|
|
|
|
url => 'URI', |
16
|
|
|
|
|
|
|
email => [qw/type value/], |
17
|
|
|
|
|
|
|
tel => [qw/type value/], |
18
|
|
|
|
|
|
|
adr => [qw/post-office-box extended-address street-address locality region postal-code country-name type value/], |
19
|
|
|
|
|
|
|
label => [], |
20
|
|
|
|
|
|
|
geo => [qw/latitude longitude/], |
21
|
|
|
|
|
|
|
tz => [], |
22
|
|
|
|
|
|
|
photo => 'URI', |
23
|
|
|
|
|
|
|
logo => 'URI', |
24
|
|
|
|
|
|
|
sound => 'URI', |
25
|
|
|
|
|
|
|
bday => [], |
26
|
|
|
|
|
|
|
title => [], |
27
|
|
|
|
|
|
|
role => [], |
28
|
|
|
|
|
|
|
org => [qw/organization-name organization-unit/], |
29
|
|
|
|
|
|
|
category => [], |
30
|
|
|
|
|
|
|
note => [], |
31
|
|
|
|
|
|
|
class => [], |
32
|
|
|
|
|
|
|
key => [], |
33
|
|
|
|
|
|
|
mailer => [], |
34
|
|
|
|
|
|
|
uid => [], |
35
|
|
|
|
|
|
|
rev => [], |
36
|
|
|
|
|
|
|
}, |
37
|
|
|
|
|
|
|
}); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
package Text::Microformat::Element::hCard::HasValue; |
40
|
3
|
|
|
3
|
|
16
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
87
|
|
41
|
3
|
|
|
3
|
|
14
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
91
|
|
42
|
3
|
|
|
3
|
|
13
|
use base 'Text::Microformat::Element'; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
455
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub ToHash { |
45
|
0
|
|
|
0
|
|
|
my $self = shift; |
46
|
|
|
|
|
|
|
|
47
|
0
|
0
|
0
|
|
|
|
if ($self->value and @{$self->value}) { |
|
0
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
return $self->SUPER::ToHash; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
else { |
51
|
0
|
|
|
|
|
|
return $self->Value; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
package Text::Microformat::Element::hCard::email; |
56
|
3
|
|
|
3
|
|
13
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
83
|
|
57
|
3
|
|
|
3
|
|
14
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
151
|
|
58
|
|
|
|
|
|
|
our @ISA = 'Text::Microformat::Element::hCard::HasValue'; |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
package Text::Microformat::Element::hCard::tel; |
61
|
3
|
|
|
3
|
|
12
|
use warnings; |
|
3
|
|
|
|
|
12
|
|
|
3
|
|
|
|
|
69
|
|
62
|
3
|
|
|
3
|
|
11
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
174
|
|
63
|
|
|
|
|
|
|
our @ISA = 'Text::Microformat::Element::hCard::HasValue'; |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 NAME |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Text::Microformat::Element::hCard - hCard plugin for Text::Microformat |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 SEE ALSO |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
L, L |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 AUTHOR |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Keith Grennan, C<< >> |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 BUGS |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Log bugs and feature requests here: L |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 SUPPORT |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Project homepage: L |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Copyright 2007 Keith Grennan, all rights reserved. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
90
|
|
|
|
|
|
|
under the same terms as Perl itself. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=cut |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
1; |