line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mojo::Feed::Item::Enclosure; |
2
|
11
|
|
|
11
|
|
82
|
use Mojo::Base -base; |
|
11
|
|
|
|
|
22
|
|
|
11
|
|
|
|
|
91
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
use overload |
5
|
0
|
|
|
0
|
|
0
|
bool => sub {1}, |
6
|
0
|
|
|
0
|
|
0
|
'""' => sub { shift->to_string }, |
7
|
11
|
|
|
11
|
|
2509
|
fallback => 1; |
|
11
|
|
|
|
|
25
|
|
|
11
|
|
|
|
|
135
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has 'dom'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has length => sub { shift->dom->attr('length'); }; |
13
|
|
|
|
|
|
|
has type => sub { shift->dom->attr('type'); }; |
14
|
|
|
|
|
|
|
has url => sub { my $attr = shift->dom->attr; $attr->{url} || $attr->{href} }; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub to_hash { |
17
|
14
|
|
|
14
|
1
|
161
|
return {map { $_ => $_[0]->$_ } (qw(length type url))}; |
|
42
|
|
|
|
|
524
|
|
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub to_string { |
21
|
0
|
|
|
0
|
1
|
|
shift->dom->to_string; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__END__ |