line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: Subscription.pm,v 1.14 2008/03/03 16:55:04 asc Exp $ |
2
|
1
|
|
|
1
|
|
1085
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Net::Delicious::Subscription; |
5
|
1
|
|
|
1
|
|
5
|
use base qw (Net::Delicious::Object); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
107
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
$Net::Delicious::Subscription::VERSION = '1.14'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Net::Delicious::Subscription - OOP for del.icio.us subscription thingies |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 SYNOPSIS |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
use Net::Delicious; |
16
|
|
|
|
|
|
|
my $del = Net::Delicious->new({...}); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
foreach my $sub ($del->inbox_subscriptions()) { |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# $sub is a Net::Delicious::Subscription |
21
|
|
|
|
|
|
|
# object. |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
print "$sub\n"; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 DESCRIPTION |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
OOP for del.icio.us subscription thingies. |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 NOTES |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=over 4 |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=item * |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
This package overrides the perl builtin I operator and returns the value of the object's I method. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=item * |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
It isn't really expected that you will instantiate these |
41
|
|
|
|
|
|
|
objects outside of I itself. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=back |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=cut |
46
|
|
|
|
|
|
|
|
47
|
1
|
|
|
1
|
|
4
|
use overload q("") => sub { shift->user() }; |
|
1
|
|
|
0
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
|
0
|
|
|
|
|
0
|
|
48
|
|
|
|
|
|
|
|
49
|
1
|
|
|
1
|
|
51
|
use Net::Delicious::Constants qw (:uri); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 PACKAGE METHODS |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=cut |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head2 __PACKAGE__->new(\%args) |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Returns a new I object. Woot! |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=cut |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
# Defined in Net::Delicious::Object |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 OBJECT METHODS |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=cut |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head2 $obj->user() |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Returns a string. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=cut |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
# Defined in Net::Delicious::Object |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head2 $obj->tag() |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Returns a string. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=cut |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
# Defined in Net::Delicious::Object |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head2 $obj->url() |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Returns a string. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=cut |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
sub url { |
90
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
91
|
0
|
|
|
|
|
|
return URI->new_abs(join("/", $self->user(),$self->tag()), URI_DELICIOUS); |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head2 $obj->as_hashref() |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Return the object as a hash ref safe for serializing and re-blessing. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=cut |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
# Defined in Net::Delicious::Object |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head1 VERSION |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
1.13 |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head1 DATE |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
$Date: 2008/03/03 16:55:04 $ |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 AUTHOR |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
Aaron Straup Cope |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head1 SEE ALSO |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
L |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head1 LICENSE |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
Copyright (c) 2004-2008 Aaron Straup Cope. All rights reserved. |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
This is free software, you may use it and distribute it under the |
123
|
|
|
|
|
|
|
same terms as Perl itself. |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=cut |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
return 1; |