line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!/usr/bin/perl |
2
|
|
|
|
|
|
|
# Item.pm |
3
|
|
|
|
|
|
|
# Copyright (c) 2006 Jonathan Rockway <jrockway@cpan.org> |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Catalyst::Model::XML::Feed::Item; |
6
|
1
|
|
|
1
|
|
3930
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
7
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
140
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
0
|
|
|
0
|
1
|
|
my ($class, $feed, $uri) = @_; |
11
|
0
|
|
|
|
|
|
my $self = |
12
|
|
|
|
|
|
|
{ _feed => $feed, |
13
|
|
|
|
|
|
|
_uri => $uri, |
14
|
|
|
|
|
|
|
_updated => time, |
15
|
|
|
|
|
|
|
}; |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
|
bless $self, $class; |
18
|
0
|
|
|
|
|
|
return $self; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub feed { |
22
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
23
|
0
|
|
|
|
|
|
return $self->{_feed}; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub uri { |
27
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
28
|
0
|
|
|
|
|
|
return $self->{_uri}; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub updated { |
32
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
33
|
0
|
|
|
|
|
|
return $self->{_updated}; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
__END__ |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 NAME |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Catalyst::Model::XML::Feed::Item - stores some extra information about |
42
|
|
|
|
|
|
|
each XML feed. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 SYNOPSIS |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
$feed{$name} = Catalyst::Model::XML::Feed::Item->new($feed, $uri); |
47
|
|
|
|
|
|
|
$feed{$name}->uri; |
48
|
|
|
|
|
|
|
$feed{$name}->updated; |
49
|
|
|
|
|
|
|
$feed{$name}->feed; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 METHODS |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head2 new($feed, $uri) |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Creates an instance. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head2 uri |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Returns the original URI of the feed. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head2 updated |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Returns the time when the Item was created. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head2 feed |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Returns the feed. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=cut |