line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: Constants.pm,v 1.13 2008/03/03 16:55:04 asc Exp $ |
2
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
328
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Net::Delicious::Constants; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
$Net::Delicious::Constants::VERSION = '1.14'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Net::Delicious::Constants - del.icio.us constant variables |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 SYNOPSIS |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# Import all the constants exported |
15
|
|
|
|
|
|
|
# by Net::Delicious::Constants::Uri |
16
|
|
|
|
|
|
|
# into the current package. |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
use Net::Delicious::Constants qw (:uri); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 DESCRIPTION |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
Import del.icio.us constant variables |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=cut |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub import { |
27
|
5
|
|
|
5
|
|
1128
|
my $self = shift; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
# |
30
|
|
|
|
|
|
|
|
31
|
5
|
|
|
|
|
11
|
my @sets = (); |
32
|
5
|
|
|
|
|
10
|
my $debug = 0; |
33
|
|
|
|
|
|
|
|
34
|
5
|
|
|
|
|
15
|
foreach (@_) { |
35
|
6
|
50
|
|
|
|
38
|
if ($_ =~ /^:(.*)/) { |
|
|
0
|
|
|
|
|
|
36
|
6
|
|
|
|
|
24
|
push @sets, $1; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
elsif (/^\+(.*)/) { |
40
|
|
|
|
|
|
|
|
41
|
0
|
0
|
|
|
|
0
|
if ($1 eq "debug") { |
42
|
0
|
|
|
|
|
0
|
$debug = 1; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
0
|
else { next; } |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
# |
50
|
|
|
|
|
|
|
|
51
|
5
|
|
|
|
|
21
|
foreach my $set (@sets) { |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
# paranoia / |
54
|
|
|
|
|
|
|
# will destroy ya |
55
|
6
|
|
|
|
|
13
|
$set =~ s/:://g; |
56
|
|
|
|
|
|
|
|
57
|
6
|
|
|
|
|
23
|
my $package = join("::",__PACKAGE__,ucfirst(lc($set))); |
58
|
6
|
|
|
|
|
15
|
my $caller = caller; |
59
|
|
|
|
|
|
|
|
60
|
6
|
50
|
|
|
|
18
|
print STDERR "* $caller wants to import $set\n" |
61
|
|
|
|
|
|
|
if ($debug); |
62
|
|
|
|
|
|
|
|
63
|
6
|
|
|
|
|
382
|
eval "require $package;"; |
64
|
6
|
50
|
|
|
|
32
|
die $@ if ($@); |
65
|
|
|
|
|
|
|
|
66
|
1
|
|
|
1
|
|
6
|
no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
207
|
|
67
|
|
|
|
|
|
|
|
68
|
6
|
|
|
|
|
10
|
foreach my $constant (@{$package."::EXPORT_OK"}) { |
|
6
|
|
|
|
|
26
|
|
69
|
16
|
|
|
|
|
20
|
*{join("::",$caller,$constant)} = \&{join("::",$package,$constant)}; |
|
16
|
|
|
|
|
686
|
|
|
16
|
|
|
|
|
47
|
|
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 VERSION |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
1.13 |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 DATE |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
$Date: 2008/03/03 16:55:04 $ |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 AUTHOR |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Aaron Straup Cope |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head1 SEE ALSO |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
L |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 LICENSE |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Copyright (c) 2004-2008 Aaron Straup Cope. All rights reserved. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
This is free software, you may use it and distribute it under the |
96
|
|
|
|
|
|
|
same terms as Perl itself. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=cut |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
return 1; |