.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Gravatar::URL 3pm" .TH Gravatar::URL 3pm "2012-04-04" "perl v5.14.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Gravatar::URL \- Make URLs for Gravatars from an email address .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Gravatar::URL; \& \& my $gravatar_id = gravatar_id($email); \& \& my $gravatar_url = gravatar_url(email => $email); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" A Gravatar is a Globally Recognized Avatar for a given email address. This allows you to have a global picture associated with your email address. You can look up the Gravatar for any email address by constructing a \s-1URL\s0 to get the image from gravatar.com. This module does that. .PP Examples of use include the author faces on . .PP See for more info. .SH "Functions" .IX Header "Functions" \fI\f(BIgravatar_url\fI\fR .IX Subsection "gravatar_url" .PP .Vb 2 \& # By email \& my $url = gravatar_url( email => $email, %options ); \& \& # By gravatar ID \& my $url = gravatar_url( id => $id, %options ); .Ve .PP Constructs a \s-1URL\s0 to fetch the gravatar for a given \f(CW$email\fR or \f(CW$id\fR. .PP \&\f(CW$id\fR is a gravatar \s-1ID\s0. See \*(L"gravatar_id\*(R" for more information. .PP \&\f(CW%options\fR are optional and are... .PP rating .IX Subsection "rating" .PP A user can rate how offensive the content of their gravatar is, like a movie. The ratings are g, pg, r and x. If you specify a rating it is the highest rating that will be given. .PP .Vb 1 \& rating => "r" # includes g, pg and r .Ve .PP size .IX Subsection "size" .PP Specifies the desired width and height of the gravatar (gravatars are square). .PP Valid values are from 1 to 512 inclusive. Any size other than 80 may cause the original gravatar image to be downsampled using bicubic resampling before output. .PP .Vb 1 \& size => 40, # 40 x 40 image .Ve .PP default .IX Subsection "default" .PP The url to use if the user has no gravatar or has none that fits your rating requirements. .PP .Vb 1 \& default => "https://secure.wikimedia.org/wikipedia/en/wiki/File:Mad30.jpg" .Ve .PP Relative URLs will be relative to the base (ie. gravatar.com), not your web site. .PP Gravatar defines special values that you may use as a default to produce dynamic default images. These are \*(L"identicon\*(R", \*(L"monsterid\*(R", \&\*(L"wavatar\*(R" and \*(L"retro\*(R". \*(L"404\*(R" will cause the \s-1URL\s0 to return an \s-1HTTP\s0 404 \*(L"Not Found\*(R" error instead whereas \*(L"mm\*(R" will display the same \*(L"mystery man\*(R" image for all missing people. See for more info. .PP If omitted, Gravatar will serve up their default image, the blue G. .PP border .IX Subsection "border" .PP \&\fB\s-1DEPRECATED\s0!\fR This key has been removed from the Gravatar protocol. It will be removed from future versions of Gravatar::URL. .PP Gravatars can be requested to have a 1 pixel colored border. If you'd like that, pass in the color to border as a 3 or 6 digit hex string. .PP .Vb 2 \& border => "000000", # a black border, like my soul \& border => "000", # black, but in 3 digits .Ve .PP base .IX Subsection "base" .PP This is the \s-1URL\s0 of the location of the Gravatar server you wish to grab Gravatars from. Defaults to for \s-1HTTP\s0 and for \s-1HTTPS\s0. .PP short_keys .IX Subsection "short_keys" .PP If true, use short key names when constructing the \s-1URL\s0. \*(L"s\*(R" instead of \*(L"size\*(R", \*(L"r\*(R" instead of \*(L"ratings\*(R" and so on. .PP short_keys defaults to true. .PP https .IX Subsection "https" .PP If true, serve avatars over \s-1HTTPS\s0 instead of \s-1HTTP\s0. .PP You should select this option if your site is served over \s-1HTTPS\s0 to avoid browser warnings about the presence of insecure content. .PP https defaults to false. .PP \fI\f(BIgravatar_id\fI\fR .IX Subsection "gravatar_id" .PP .Vb 1 \& my $id = gravatar_id($email); .Ve .PP Converts an \f(CW$email\fR address into its Gravatar \f(CW$id\fR. .SH "THANKS" .IX Header "THANKS" Thanks to gravatar.com for coming up with the whole idea and Ashley Pond V from whose Template::Plugin::Gravatar I took most of the original code. .SH "LICENSE" .IX Header "LICENSE" Copyright 2007 \- 2009, Michael G Schwern . Copyright 2011, Francois Marier . .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .PP See \fIhttp://dev.perl.org/licenses/artistic.html\fR .SH "SEE ALSO" .IX Header "SEE ALSO" Template::Plugin::Gravatar \- a Gravatar plugin for Template Toolkit .PP \- The Gravatar web site .PP \- The Gravatar \s-1URL\s0 implementor's guide