File Coverage

blib/lib/Unicornify/URL.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 1 1 100.0
total 21 21 100.0


line stmt bran cond sub pod time code
1             package Unicornify::URL;
2              
3 1     1   25442 use strict;
  1         2  
  1         39  
4 1     1   5 use warnings;
  1         2  
  1         41  
5              
6             our $VERSION = '1.06';
7              
8 1     1   525 use Gravatar::URL qw(gravatar_url);
  1         3  
  1         100  
9              
10 1     1   6 use parent 'Exporter';
  1         2  
  1         4  
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 42 my %args = @_;
70              
71 2         11 Gravatar::URL::_apply_defaults(\%args, \%defaults);
72 2         11 return gravatar_url(%args);
73             }
74              
75             "OMG! UNICORNS!";