| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Unicornify::URL; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
13429
|
use strict; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
25
|
|
|
4
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
35
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '1.07'; |
|
7
|
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
345
|
use Gravatar::URL qw(gravatar_url); |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
47
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
4
|
use parent 'Exporter'; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
3
|
|
|
11
|
|
|
|
|
|
|
our @EXPORT = qw( |
|
12
|
|
|
|
|
|
|
unicornify_url |
|
13
|
|
|
|
|
|
|
); |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
my $Unicornify_Base = "http://unicornify.appspot.com/avatar/"; |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 NAME |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
Unicornify::URL - OMG UNICORN AVATAR! |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
use Unicornify::URL; |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
my $url = unicornify_url( email => 'larry@wall.org' ); |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Now you can have your very own generated Unicorn avatar! OMG! SQUEE! |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
See L for more information. *heart* |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 Functions |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head3 B |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
my $url = unicornify_url( email => $email, %options ); |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Constructs a URL to fetch the unicorn avatar for the given $email address. |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
C<%options> are optional. C will accept all the |
|
43
|
|
|
|
|
|
|
options of L but as of this time only |
|
44
|
|
|
|
|
|
|
C has any effect. |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head4 size |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Specifies the desired width and height of the avatar (they are square) |
|
49
|
|
|
|
|
|
|
in pixels. |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
As of this writing, valid values are from 32 to 128. The default is |
|
52
|
|
|
|
|
|
|
32. |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
L |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
L |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
"The Last Unicorn" |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=cut |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
my %defaults = ( |
|
65
|
|
|
|
|
|
|
base => $Unicornify_Base, |
|
66
|
|
|
|
|
|
|
short_keys => 1, |
|
67
|
|
|
|
|
|
|
); |
|
68
|
|
|
|
|
|
|
sub unicornify_url { |
|
69
|
2
|
|
|
2
|
1
|
11
|
my %args = @_; |
|
70
|
|
|
|
|
|
|
|
|
71
|
2
|
|
|
|
|
7
|
Gravatar::URL::_apply_defaults(\%args, \%defaults); |
|
72
|
2
|
|
|
|
|
7
|
return gravatar_url(%args); |
|
73
|
|
|
|
|
|
|
} |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
"OMG! UNICORNS!"; |