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