| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package Acme::CPANAuthors::Acme::CPANAuthors::Authors; | 
| 2 | 1 |  |  | 1 |  | 28443 | use strict; | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 42 |  | 
| 3 | 1 |  |  | 1 |  | 5 | use warnings; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 31 |  | 
| 4 |  |  |  |  |  |  |  | 
| 5 |  |  |  |  |  |  | =head1 NAME | 
| 6 |  |  |  |  |  |  |  | 
| 7 |  |  |  |  |  |  | Acme::CPANAuthors::Acme::CPANAuthors::Authors - We are CPAN authors who have authored Acme::CPANAuthors modules | 
| 8 |  |  |  |  |  |  |  | 
| 9 |  |  |  |  |  |  | =cut | 
| 10 |  |  |  |  |  |  |  | 
| 11 | 1 |  |  | 1 |  | 2894 | use version; our $VERSION = version->declare('v1.0.0'); | 
|  | 1 |  |  |  |  | 2861 |  | 
|  | 1 |  |  |  |  | 7 |  | 
| 12 |  |  |  |  |  |  | use Acme::CPANAuthors::Register ( | 
| 13 | 1 |  |  |  |  | 9 | ABIGAIL  => q[Abigail],          # A::C::Dutch ...or not. | 
| 14 |  |  |  |  |  |  | ACALPINI => q[Aldo Calpini],     # A::C::Italian | 
| 15 |  |  |  |  |  |  | ASHLEY   => q[Ashley Pond V],    # A::C::Misanthrope | 
| 16 |  |  |  |  |  |  | AZAWAWI => | 
| 17 |  |  |  |  |  |  | q[أحمد محمد زواوي - Ahmad M. Zawawi],    # A::C::Arabic | 
| 18 |  |  |  |  |  |  | BARBIE    => q[Barbie],                               # A::C::British | 
| 19 |  |  |  |  |  |  | BINGOS    => q[Chris Williams],                       # A::C::POE | 
| 20 |  |  |  |  |  |  | BRACETA   => q[Luís Azevedo],                        # A::C::Portuguese | 
| 21 |  |  |  |  |  |  | BURAK     => q[Burak Gürsoy],                        # A::C::Turkish | 
| 22 |  |  |  |  |  |  | ETHER     => q[Karen Etheridge],                      # A::C::Nonhuman | 
| 23 |  |  |  |  |  |  | FAYLAND   => q[Fayland 林],                          # A::C::Chinese | 
| 24 |  |  |  |  |  |  | FLORA     => q[Florian Ragwitz],                      # A::C::German | 
| 25 |  |  |  |  |  |  | GARU      => q[Breno G. de Oliveira],                 # A::C::Brazilian | 
| 26 |  |  |  |  |  |  | GRAY      => q[gray],                                 # A::C::GitHub | 
| 27 |  |  |  |  |  |  | GUGOD     => q[劉康民],                            # A::C::Taiwanese | 
| 28 |  |  |  |  |  |  | HINRIK    => q[Hinrik Örn Sigurðsson],              # A::C::Icelandic | 
| 29 |  |  |  |  |  |  | ISHIGAKI  => q[Kenichi Ishigaki],                     # The Original | 
| 30 |  |  |  |  |  |  | JEEN      => q[Jeen Lee],                             # A::C::Korean | 
| 31 |  |  |  |  |  |  | JLMARTIN  => q[Jose Luis Martinez Torres],            # A::C::Catalonian | 
| 32 |  |  |  |  |  |  | KAARE     => q[Kaare Rasmussen],                      # A::C::Danish | 
| 33 |  |  |  |  |  |  | KENTARO   => q[Kentaro Kuribayashi],                  # A::C::GeekHouse | 
| 34 |  |  |  |  |  |  | MARCEL    => q[Marcel Grünauer == hanekomu],         # A::C::Austrian | 
| 35 |  |  |  |  |  |  | MONS      => q[Mons Anderson],                        # A::C::AnyEvent | 
| 36 |  |  |  |  |  |  | RBO       => q[Robert Bohne],                         # A::C::German | 
| 37 |  |  |  |  |  |  | SALVA     => q[Salvador Fandiño García],            # A::C::Spanish | 
| 38 |  |  |  |  |  |  | SANKO     => q[Sanko Robinson],                       # Hey, that's me! | 
| 39 |  |  |  |  |  |  | SAPER     => q[Sébastien Aperghis-Tramoni],          # A::C::French | 
| 40 |  |  |  |  |  |  | SFINK     => q[Steve A Fink],                         # A::C::Not | 
| 41 |  |  |  |  |  |  | SHANTANU  => q[Shantanu Bhadoria],                    # A::C::India | 
| 42 |  |  |  |  |  |  | SHARIFULN => q[Анатолий Шарифулин],  # A::C::Russian | 
| 43 |  |  |  |  |  |  | SHARYANTO => q[Steven Haryanto],                      # A::C::Indonesian | 
| 44 |  |  |  |  |  |  | SHLOMIF   => q[Shlomi Fish],                          # A::C::Israeli | 
| 45 |  |  |  |  |  |  | SKIM      => q[Michal Špaček],                      # A::C::Czech | 
| 46 |  |  |  |  |  |  | SROMANOV  => q[Сергей Романов],          # A::C::Belarusian | 
| 47 |  |  |  |  |  |  | VPIT      => q[Vincent Pit],                          # A::C::You're_using | 
| 48 |  |  |  |  |  |  | WOLDRICH  => q[Magnus Woldrich],                      # A::C::Swedish | 
| 49 |  |  |  |  |  |  | ZOFFIX    => q[Zoffix Znet]                           # A::C::Canadian | 
| 50 | 1 |  |  | 1 |  | 1497 | ); | 
|  | 1 |  |  |  |  | 655 |  | 
| 51 |  |  |  |  |  |  |  | 
| 52 |  |  |  |  |  |  | sub _regen { | 
| 53 | 0 |  |  | 0 |  |  | require HTTP::Tiny; | 
| 54 | 0 |  |  |  |  |  | my $data    = ''; | 
| 55 | 0 |  |  |  |  |  | my $authsec = 0; | 
| 56 | 0 |  |  |  |  |  | my %authors; | 
| 57 |  |  |  |  |  |  | die "Failed\n" | 
| 58 |  |  |  |  |  |  | unless HTTP::Tiny->new->request( | 
| 59 |  |  |  |  |  |  | 'GET', | 
| 60 |  |  |  |  |  |  | 'http://www.cpan.org/modules/02packages.details.txt', | 
| 61 |  |  |  |  |  |  | {data_callback => sub {    # Don't scrape the whole file | 
| 62 | 0 |  |  | 0 |  |  | my $chunk = shift; | 
| 63 | 0 | 0 |  |  |  |  | if ($chunk =~ m[^Acme::CPANAuthors]sm) { | 
|  |  | 0 |  |  |  |  |  | 
| 64 | 0 |  |  |  |  |  | $authsec++; | 
| 65 | 0 |  |  |  |  |  | $data .= $chunk; | 
| 66 |  |  |  |  |  |  | } | 
| 67 |  |  |  |  |  |  | elsif ($authsec) {    # No more Authors in 02packages | 
| 68 | 0 |  |  |  |  |  | while ($data | 
| 69 |  |  |  |  |  |  | =~ m[^(?:Acme::CPANAuthors(?:::(\S+))?).+\w/\w\w/(\w+)/.+$]mg | 
| 70 |  |  |  |  |  |  | ) | 
| 71 | 0 |  | 0 |  |  |  | {   $authors{$2} //= []; | 
| 72 | 0 |  |  |  |  |  | push @{$authors{$2}}, $1; | 
|  | 0 |  |  |  |  |  |  | 
| 73 |  |  |  |  |  |  | } | 
| 74 | 0 |  |  |  |  |  | my %old = authors();    # Current authors | 
| 75 | 0 | 0 |  |  |  |  | my @new = grep { defined $old{$_} ? () : $_ } keys %authors; | 
|  | 0 |  |  |  |  |  |  | 
| 76 | 0 |  |  |  |  |  | print scalar(@new) | 
| 77 |  |  |  |  |  |  | . " new Acme::CPANAuthors authors to add\n"; | 
| 78 | 0 | 0 |  |  |  |  | return if !@new; | 
| 79 | 0 |  |  |  |  |  | require MetaCPAN::API; | 
| 80 | 0 |  |  |  |  |  | my $mcpan = MetaCPAN::API->new(); | 
| 81 | 0 |  |  |  |  |  | binmode(STDOUT, ':utf8'); | 
| 82 |  |  |  |  |  |  |  | 
| 83 | 0 |  |  |  |  |  | for my $id (sort @new) { | 
| 84 | 0 |  |  |  |  |  | my $author = $mcpan->author($id); | 
| 85 | 0 |  |  |  |  |  | printf "    %s => q[%s], # %s\n", $id, $author->{name}, | 
| 86 | 0 |  |  |  |  |  | join ', ', map { 'A::C::' . $_ } @{$authors{$id}}; | 
|  | 0 |  |  |  |  |  |  | 
| 87 |  |  |  |  |  |  | } | 
| 88 |  |  |  |  |  |  | exit    # We're done | 
| 89 | 0 |  |  |  |  |  | } | 
| 90 |  |  |  |  |  |  | } | 
| 91 |  |  |  |  |  |  | } | 
| 92 | 0 | 0 |  |  |  |  | )->{success}; | 
| 93 |  |  |  |  |  |  | } | 
| 94 |  |  |  |  |  |  | 1; | 
| 95 |  |  |  |  |  |  |  | 
| 96 |  |  |  |  |  |  | =head1 Synopsis | 
| 97 |  |  |  |  |  |  |  | 
| 98 |  |  |  |  |  |  | use Acme::CPANAuthors; | 
| 99 |  |  |  |  |  |  |  | 
| 100 |  |  |  |  |  |  | my $authors = Acme::CPANAuthors->new('Acme::CPANAuthors::Acme::CPANAuthors::Authors'); | 
| 101 |  |  |  |  |  |  |  | 
| 102 |  |  |  |  |  |  | $number   = $authors->count; | 
| 103 |  |  |  |  |  |  | @ids      = $authors->id; | 
| 104 |  |  |  |  |  |  | @distros  = $authors->distributions('ACALPINI'); | 
| 105 |  |  |  |  |  |  | $url      = $authors->avatar_url('SHLOMIF'); | 
| 106 |  |  |  |  |  |  | $kwalitee = $authors->kwalitee('SANKO'); | 
| 107 |  |  |  |  |  |  |  | 
| 108 |  |  |  |  |  |  | =head1 Description | 
| 109 |  |  |  |  |  |  |  | 
| 110 |  |  |  |  |  |  | This class provides a hash of Pause IDs/names of Acme::CPANAuthors::* | 
| 111 |  |  |  |  |  |  | authorin' CPAN authors. | 
| 112 |  |  |  |  |  |  |  | 
| 113 |  |  |  |  |  |  | I started this module because | 
| 114 |  |  |  |  |  |  | L doesn't | 
| 115 |  |  |  |  |  |  | exist and apparently I'm not listed in | 
| 116 |  |  |  |  |  |  | L. ((sigh)) I just | 
| 117 |  |  |  |  |  |  | want to be a part of something... great... greater... than-- um, sorry, lost | 
| 118 |  |  |  |  |  |  | my train of thought. | 
| 119 |  |  |  |  |  |  |  | 
| 120 |  |  |  |  |  |  | Anyway, I decided both L | 
| 121 |  |  |  |  |  |  | (well covered between http://search.cpan.org/author/ and | 
| 122 |  |  |  |  |  |  | http://pause.perl.org/pause/query?ACTION=who_is) and | 
| 123 |  |  |  |  |  |  | L (only include authors | 
| 124 |  |  |  |  |  |  | who have published at least one distribution, script, etc.) would just be too | 
| 125 |  |  |  |  |  |  | time consuming for a 3AM lapse in judgement so... there you are. | 
| 126 |  |  |  |  |  |  |  | 
| 127 |  |  |  |  |  |  | =head1 Installation | 
| 128 |  |  |  |  |  |  |  | 
| 129 |  |  |  |  |  |  | To install this module, run the following commands: | 
| 130 |  |  |  |  |  |  |  | 
| 131 |  |  |  |  |  |  | perl Build.PL | 
| 132 |  |  |  |  |  |  | ./Build | 
| 133 |  |  |  |  |  |  | ./Build test | 
| 134 |  |  |  |  |  |  | ./Build install | 
| 135 |  |  |  |  |  |  |  | 
| 136 |  |  |  |  |  |  | =head1 Maintenance | 
| 137 |  |  |  |  |  |  |  | 
| 138 |  |  |  |  |  |  | Have you authored a module in the C namespace, aren't | 
| 139 |  |  |  |  |  |  | listed here, and would like to be? Or are you currently listed but have since | 
| 140 |  |  |  |  |  |  | turned away from your deviant, C ways and would like to be removed? Just | 
| 141 |  |  |  |  |  |  | contact me L or stop by the Issue Tracker and I'll fix ya | 
| 142 |  |  |  |  |  |  | right up. | 
| 143 |  |  |  |  |  |  |  | 
| 144 |  |  |  |  |  |  | =head1 Bugs | 
| 145 |  |  |  |  |  |  |  | 
| 146 |  |  |  |  |  |  | Report any bugs or feature requests to the Issue tracker or | 
| 147 |  |  |  |  |  |  | directly to L. I'll keep you up to date on any related | 
| 148 |  |  |  |  |  |  | changes. | 
| 149 |  |  |  |  |  |  |  | 
| 150 |  |  |  |  |  |  | Seriously, it's just a list of names... what could possibly go wrong? | 
| 151 |  |  |  |  |  |  |  | 
| 152 |  |  |  |  |  |  | E_E | 
| 153 |  |  |  |  |  |  |  | 
| 154 |  |  |  |  |  |  | E_E | 
| 155 |  |  |  |  |  |  |  | 
| 156 |  |  |  |  |  |  | Yeah. | 
| 157 |  |  |  |  |  |  |  | 
| 158 |  |  |  |  |  |  | =head1 Support | 
| 159 |  |  |  |  |  |  |  | 
| 160 |  |  |  |  |  |  | You can find documentation for this module with the perldoc command. | 
| 161 |  |  |  |  |  |  |  | 
| 162 |  |  |  |  |  |  | perldoc Acme::CPANAuthors::Acme::CPANAuthors::Authors | 
| 163 |  |  |  |  |  |  |  | 
| 164 |  |  |  |  |  |  | You can also look for information at: | 
| 165 |  |  |  |  |  |  |  | 
| 166 |  |  |  |  |  |  | =over 4 | 
| 167 |  |  |  |  |  |  |  | 
| 168 |  |  |  |  |  |  | =item * Issue Tracker: Acme::CPANAuthors::Acme::CPANAuthors::Authors' bug tracker | 
| 169 |  |  |  |  |  |  |  | 
| 170 |  |  |  |  |  |  | http://github.com/sanko/acme-cpanauthors-acme-cpanauthors-authors/issues/ | 
| 171 |  |  |  |  |  |  |  | 
| 172 |  |  |  |  |  |  | =item * AnnoCPAN: Annotated CPAN documentation | 
| 173 |  |  |  |  |  |  |  | 
| 174 |  |  |  |  |  |  | http://annocpan.org/dist/Acme-CPANAuthors-Acme-CPANAuthors-Authors | 
| 175 |  |  |  |  |  |  |  | 
| 176 |  |  |  |  |  |  | =item * CPAN Ratings | 
| 177 |  |  |  |  |  |  |  | 
| 178 |  |  |  |  |  |  | http://cpanratings.perl.org/d/Acme-CPANAuthors-Acme-CPANAuthors-Authors | 
| 179 |  |  |  |  |  |  |  | 
| 180 |  |  |  |  |  |  | =item * Search CPAN | 
| 181 |  |  |  |  |  |  |  | 
| 182 |  |  |  |  |  |  | http://search.cpan.org/dist/Acme-CPANAuthors-Acme-CPANAuthors-Authors | 
| 183 |  |  |  |  |  |  |  | 
| 184 |  |  |  |  |  |  | =item * Version Control Repository: | 
| 185 |  |  |  |  |  |  |  | 
| 186 |  |  |  |  |  |  | http://github.com/sanko/acme-cpanauthors-acme-cpanauthors-authors/ | 
| 187 |  |  |  |  |  |  |  | 
| 188 |  |  |  |  |  |  | =back | 
| 189 |  |  |  |  |  |  |  | 
| 190 |  |  |  |  |  |  | =head1 See Also | 
| 191 |  |  |  |  |  |  |  | 
| 192 |  |  |  |  |  |  | L, | 
| 193 |  |  |  |  |  |  | L, | 
| 194 |  |  |  |  |  |  | L, | 
| 195 |  |  |  |  |  |  | L, et al. | 
| 196 |  |  |  |  |  |  |  | 
| 197 |  |  |  |  |  |  | See the examples found in F for usage. | 
| 198 |  |  |  |  |  |  |  | 
| 199 |  |  |  |  |  |  | =head1 Acknowledgements | 
| 200 |  |  |  |  |  |  |  | 
| 201 |  |  |  |  |  |  | Kenichi Ishigaki for L | 
| 202 |  |  |  |  |  |  |  | 
| 203 |  |  |  |  |  |  | =head1 Author | 
| 204 |  |  |  |  |  |  |  | 
| 205 |  |  |  |  |  |  | Sanko Robinson  - http://sankorobinson.com/ | 
| 206 |  |  |  |  |  |  |  | 
| 207 |  |  |  |  |  |  | CPAN ID: SANKO | 
| 208 |  |  |  |  |  |  |  | 
| 209 |  |  |  |  |  |  | =head1 License and Legal | 
| 210 |  |  |  |  |  |  |  | 
| 211 |  |  |  |  |  |  | Copyright (C) 2009-2013 by Sanko Robinson Esanko@cpan.orgE | 
| 212 |  |  |  |  |  |  |  | 
| 213 |  |  |  |  |  |  | This program is free software; you can redistribute it and/or modify | 
| 214 |  |  |  |  |  |  | it under the terms of The Artistic License 2.0.  See the F | 
| 215 |  |  |  |  |  |  | file included with this distribution or | 
| 216 |  |  |  |  |  |  | http://www.perlfoundation.org/artistic_license_2_0.  For | 
| 217 |  |  |  |  |  |  | clarification, see http://ww.perlfoundation.org/artistic_2_0_notes. | 
| 218 |  |  |  |  |  |  |  | 
| 219 |  |  |  |  |  |  | When separated from the distribution, all POD documentation is covered | 
| 220 |  |  |  |  |  |  | by the Creative Commons Attribution-Share Alike 3.0 License.  See | 
| 221 |  |  |  |  |  |  | http://creativecommons.org/licenses/by-sa/3.0/us/legalcode.  For | 
| 222 |  |  |  |  |  |  | clarification, see http://creativecommons.org/licenses/by-sa/3.0/us/. | 
| 223 |  |  |  |  |  |  |  | 
| 224 |  |  |  |  |  |  | =cut |