Changeset 404 for lang/perl/Acme-JapaneseCPANAuthors
- Timestamp:
- 10/06/07 17:12:59 (14 months ago)
- Location:
- lang/perl/Acme-JapaneseCPANAuthors/trunk
- Files:
-
- 4 modified
-
Changes (modified) (1 diff)
-
Makefile.PL (modified) (1 diff)
-
lib/Acme/JapaneseCPANAuthors.pm (modified) (4 diffs)
-
t/01_basic.t (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Acme-JapaneseCPANAuthors/trunk/Changes
r341 r404 1 1 Revision history for Acme-JapaneseCPANAuthors 2 2 3 0.01 2007/10/02 3 0.071006 2007/10/06 4 - added avatar method 5 6 0.071002 2007/10/02 4 7 - initial release 5 8 -
lang/perl/Acme-JapaneseCPANAuthors/trunk/Makefile.PL
r341 r404 10 10 PREREQ_PM => { 11 11 'CPAN' => 0, # not yet sure which version we should require 12 'Digest::MD5' => 0, 12 13 'Test::UseAllModules' => 0, 14 'URI::Escape' => 0, 13 15 }, 14 16 ($ExtUtils::MakeMaker::VERSION >= 6.31 -
lang/perl/Acme-JapaneseCPANAuthors/trunk/lib/Acme/JapaneseCPANAuthors.pm
r347 r404 5 5 use Acme::JapaneseCPANAuthors::Registered; 6 6 7 our $VERSION = '0.07100 2';7 our $VERSION = '0.071006'; 8 8 9 9 sub count { … … 72 72 } 73 73 74 sub avatar { 75 my ($class, $id, %options) = @_; 76 77 return unless $id; 78 79 require Digest::MD5; 80 my $cpan_email = (lc $id).'@cpan.org'; 81 my $gravatar_id = Digest::MD5::md5_hex($cpan_email); 82 my $uri = 'http://www.gravatar.com/avatar.php?gravatar_id='.$gravatar_id; 83 if ( $options{default} ) { 84 require URI::Escape; 85 $uri .= '&default='.URI::Escape::uri_escape($options{default}); 86 } 87 if ( $options{size} ) { 88 $uri .= '&size='.$options{size}; 89 } 90 if ( $options{rating} ) { 91 $uri .= '&rating='.$options{rating}; 92 } 93 return $uri; 94 } 95 74 96 1; 75 97 … … 86 108 @ids = Acme::JapaneseCPANAuthors->id; 87 109 %distros = Acme::JapaneseCPANAuthors->distributions('ISHIGAKI'); 110 $uri = Acme::JapaneseCPANAuthors->avatar('MIYAGAWA'); 88 111 89 112 =head1 DESCRIPTION … … 119 142 or CPAN::DistnameInfo object. 120 143 144 =head2 avatar 145 146 returns gravatar uri of the id shown at search.cpan.org. 147 see L<http://site.gravatar.com/site/implement> for details. 148 121 149 =head1 AUTHOR 122 150 -
lang/perl/Acme-JapaneseCPANAuthors/trunk/t/01_basic.t
r341 r404 18 18 ok $name =~ /Ishigaki/i; 19 19 20 my $avatar = Acme::JapaneseCPANAuthors->avatar('ISHIGAKI'); 21 ok $avatar;
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)