line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::Microformat::Element::URI; |
2
|
3
|
|
|
3
|
|
14
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
76
|
|
3
|
3
|
|
|
3
|
|
13
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
83
|
|
4
|
3
|
|
|
3
|
|
14
|
use base 'Text::Microformat::Element'; |
|
3
|
|
|
|
|
11
|
|
|
3
|
|
|
|
|
572
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub MachineValue { |
7
|
16
|
|
|
16
|
0
|
196
|
my $self = shift; |
8
|
16
|
50
|
|
|
|
54
|
my $tag = defined $self->_element->local_name ? $self->_element->local_name : ""; |
9
|
16
|
50
|
|
|
|
50
|
if ($tag eq 'a') { |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
10
|
16
|
|
|
|
|
45
|
return $self->_element->attr('href'); |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
elsif ($tag eq 'img') { |
13
|
0
|
|
|
|
|
|
return $self->_element->attr('src'); |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
elsif ($tag eq 'object') { |
16
|
0
|
|
|
|
|
|
return $self->_element->attr('data'); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
else { |
19
|
0
|
|
|
|
|
|
return $self->SUPER::MachineValue; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 NAME |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
Text::Microformat::Element::URI - a Microformat URI element |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 SEE ALSO |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
L, L |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 AUTHOR |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Keith Grennan, C<< >> |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 BUGS |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Log bugs and feature requests here: L |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 SUPPORT |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Project homepage: L |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Copyright 2007 Keith Grennan, all rights reserved. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
48
|
|
|
|
|
|
|
under the same terms as Perl itself. |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=cut |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |