Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 76 lines (45 sloc) 1.372 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
package Unicornify::URL;

use strict;
use warnings;

our $VERSION = '1.06';

use Gravatar::URL qw(gravatar_url);

use parent 'Exporter';
our @EXPORT = qw(
unicornify_url
);

my $Unicornify_Base = "http://unicornify.appspot.com/avatar/";


=head1 NAME

Unicornify::URL - OMG UNICORN AVATAR!

=head1 SYNOPSIS

use Unicornify::URL;

my $url = unicornify_url( email => 'larry@wall.org' );

=head1 DESCRIPTION

Now you can have your very own generated Unicorn avatar! OMG! SQUEE!

See L<http://unicornify.appspot.com/use-it> for more information. *heart*

=head1 Functions

=head3 B<unicornify_url>

my $url = unicornify_url( email => $email, %options );

Constructs a URL to fetch the unicorn avatar for the given $email address.

C<%options> are optional. C<unicornify_url> will accept all the
options of L<Gravatar::URL/gravatar_url> but as of this time only
C<size> has any effect.

=head4 size

Specifies the desired width and height of the avatar (they are square)
in pixels.

As of this writing, valid values are from 32 to 128. The default is
32.

=head1 SEE ALSO

L<Gravatar::URL>

L<Acme::Pony>

"The Last Unicorn"

=cut

my %defaults = (
    base => $Unicornify_Base,
    short_keys => 1,
);
sub unicornify_url {
    my %args = @_;

    Gravatar::URL::_apply_defaults(\%args, \%defaults);
    return gravatar_url(%args);
}

"OMG! UNICORNS!";
Something went wrong with that request. Please try again.