Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

imported from version 0.01, see Changes file.

  • Loading branch information...
commit dd59e7f80386bf4b1491934c86212211962aad7b 0 parents
Barbie authored
5 Changes
@@ -0,0 +1,5 @@
+Revision history for Acme-CPANAuthors-British
+
+0.01 10/11/2009
+ First version, released because no-one else dared!
+
17 MANIFEST
@@ -0,0 +1,17 @@
+MANIFEST
+META.yml
+Makefile.PL
+README
+Changes
+lib/Acme/CPANAuthors/British.pm
+lib/Acme/CPANAuthors/British/Companies.pm
+examples/author_info
+examples/company_info
+examples/count
+t/00load.t
+t/10british.t
+t/11companies.t
+t/90podtest.t
+t/91podcover.t
+t/94metatest.t
+t/95changedate.t
15 META.yml
@@ -0,0 +1,15 @@
+--- #YAML:1.0
+name: Acme-CPANAuthors-British
+version: 0.01
+abstract: We are British CPAN authors
+license: perl
+author:
+ - Barbie <barbie@cpan.org>
+generated_by: ExtUtils::MakeMaker version 6.42
+distribution_type: module
+requires:
+ Acme::CPANAuthors: 0.04
+ Test::More: 0.70
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.3.html
+ version: 1.3
21 Makefile.PL
@@ -0,0 +1,21 @@
+use strict;
+use warnings;
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+ NAME => 'Acme::CPANAuthors::British',
+ LICENSE => 'perl',
+ AUTHOR => 'Barbie <barbie@cpan.org>',
+ VERSION_FROM => 'lib/Acme/CPANAuthors/British.pm',
+ ABSTRACT_FROM => 'lib/Acme/CPANAuthors/British.pm',
+ PREREQ_PM => {
+ # prereqs
+ 'Acme::CPANAuthors' => '0.04',
+
+ # build/test prereqs
+ 'Test::More' => '0.70',
+ },
+ PL_FILES => {},
+ dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
+ clean => { FILES => 'Acme-CPANAuthors-British-*' },
+);
47 README
@@ -0,0 +1,47 @@
+NAME
+
+ Acme::CPANAuthors::British - We are British CPAN authors
+
+DESCRIPTION
+
+ This class provides a hash of British CPAN authors' PAUSE ID and name to
+ the Acme::CPANAuthors module. As an added bonus this distribution also
+ includes a list of British Companies too!
+
+INSTALLATION
+
+ To install this module, run the following commands:
+
+ perl Makefile.PL
+ make
+ make test
+ make install
+
+SUPPORT AND DOCUMENTATION
+
+ After installing, you can find documentation for this module with the
+ perldoc command.
+
+ perldoc Acme::CPANAuthors::British
+
+ You can also look for information at:
+
+ RT, CPAN's request tracker
+ http://rt.cpan.org/NoAuth/Bugs.html?Dist=Acme-CPANAuthors-British
+
+ AnnoCPAN, Annotated CPAN documentation
+ http://annocpan.org/dist/Acme-CPANAuthors-British
+
+ CPAN Ratings
+ http://cpanratings.perl.org/d/Acme-CPANAuthors-British
+
+ Search CPAN
+ http://search.cpan.org/dist/Acme-CPANAuthors-British
+
+
+COPYRIGHT AND LICENCE
+
+ Copyright (C) 2009 Barbie for Miss Barbell Productions.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the same terms as Perl itself.
26 examples/author_info
@@ -0,0 +1,26 @@
+#!/usr/bin/perl
+use strict;
+use Acme::CPANAuthors;
+
+die "usage: $0 PAUSE_ID [PAUSE_ID ...]\n" unless @ARGV;
+
+my $authors = Acme::CPANAuthors->new("British");
+
+for my $id (@ARGV) {
+ $id = uc $id;
+ my $name = $authors->name($id) || $id;
+ my @dists = $authors->distributions($id);
+ my $kwalitee = $authors->kwalitee($id);
+
+ print "$name has published ", ~~@dists," distributions:\n";
+
+ @dists = sort { lc($a->dist) cmp lc($b->dist) } @dists;
+
+ for my $dist (@dists) {
+ printf " - %s v%s, kwalitee %s\n",
+ $dist->dist, $dist->version,
+ $kwalitee->{distributions}{ $dist->dist }{kwalitee},
+ }
+
+ print $/ if @ARGV > 1;
+}
26 examples/company_info
@@ -0,0 +1,26 @@
+#!/usr/bin/perl
+use strict;
+use Acme::CPANAuthors;
+
+die "usage: $0 PAUSE_ID [PAUSE_ID ...]\n" unless @ARGV;
+
+my $authors = Acme::CPANAuthors->new("British::Companies");
+
+for my $id (@ARGV) {
+ $id = uc $id;
+ my $name = $authors->name($id) || $id;
+ my @dists = $authors->distributions($id);
+ my $kwalitee = $authors->kwalitee($id);
+
+ print "$name has published ", ~~@dists," distributions:\n";
+
+ @dists = sort { lc($a->dist) cmp lc($b->dist) } @dists;
+
+ for my $dist (@dists) {
+ printf " - %s v%s, kwalitee %s\n",
+ $dist->dist, $dist->version,
+ $kwalitee->{distributions}{ $dist->dist }{kwalitee},
+ }
+
+ print $/ if @ARGV > 1;
+}
8 examples/count
@@ -0,0 +1,8 @@
+#!/usr/bin/perl
+use strict;
+use Acme::CPANAuthors;
+
+my $authors = Acme::CPANAuthors->new("British");
+my $number = $authors->count;
+
+print "$number declared British CPAN authors\n";
372 lib/Acme/CPANAuthors/British.pm
@@ -0,0 +1,372 @@
+package Acme::CPANAuthors::British;
+use strict;
+use warnings;
+
+{
+ no strict "vars";
+ $VERSION = "0.01";
+}
+
+use Acme::CPANAuthors::Register (
+ ABURLISON => 'Alan Burlison',
+ ABW => 'Andy Wardley',
+ ADDW => 'Alain Williams',
+ ADIE => 'Adrian Howard',
+ AECOOPER => 'Anthony Edward Cooper',
+ AGIERTH => 'Andrew P. J. Gierth',
+ AHORNBY => 'Alex Hornby',
+ AJFRY => 'Alan J. Fry',
+ AJGOUGH => 'Alex Gough',
+ ALANC => 'Alan Champion',
+ ALEXF => 'Alex Francis',
+ ALEXMC => 'Alex McLintock',
+ ALPOW => 'Alan Pownall',
+ ANDREWF => 'Andrew Ford',
+ ANDREWS => 'Andrew Stringer',
+ ANDYA => 'Andy Armstrong',
+ ANWILL => 'Andy Williams',
+ ARC => 'Aaron Crane',
+ ASH => 'Ash Berlin',
+ ASPIERS => 'Adam Spiers',
+ ATRICKETT => 'Adam John Trickett',
+ BADGERSRC => 'Mark Clements',
+ BARBIE => 'Barbie',
+ BEN => 'Ben Laurie',
+ BIGPRESH => 'David Precious',
+ BINGOS => 'Chris Williams',
+ BISSCUITT => 'Ian Bissett',
+ BMORROW => 'Ben Morrow',
+ BOBNET => 'Robert Cornell',
+ BOBTFISH => 'Tomas Doran',
+ BOBW => 'Bob Wilkinson',
+ CAILLTE => 'Simon Parsons',
+ CCOLBOURN => 'Charles Colbourn',
+ CDOT => 'Crawford Currie',
+ CHISEL => 'Chisel Wright',
+ CHSTROSS => 'Charlie Stross',
+ CLIFFORDJ => 'Jason Clifford',
+ COLINFINE => 'Colin Fine',
+ COSMICNET => 'Lyle Hopkins',
+ COWFISH => 'Billy Abbott',
+ CPWILLMOT => 'Christopher Willmot',
+ DAVE => 'Dave Holland',
+ DAVECROSS => 'Dave Cross',
+ DAVEHODG => 'Dave Hodgkinson',
+ DAVIDHJ => 'David Hugh-Jones',
+ DCANTRELL => 'David Cantrell',
+ DGL => 'David Leadbeater',
+ DHICKLING => 'Dave Hickling',
+ DIOCLES => 'Tim Retout',
+ DIVEC => 'David Chan',
+ DOM => 'Dominic Hargreaves',
+ DORWARD => 'David Dorward',
+ DRAXIL => 'Joe Higton',
+ DUFFEE => 'Boyd Duffee',
+ DVSM => 'Stuart Butler',
+ DWILSON => 'Dean Wilson',
+ EFIFER => 'Eric Fifer',
+ ELLIOTT => 'Simon Elliott',
+ ELPENGUIN => 'James Laver',
+ EMARTIN => 'Earle Martin',
+ EVDB => 'Edmund von der Burg',
+ EXOBUZZ => 'Jools Wills',
+ GHENRY => 'Gavin Henry',
+ GLENSMALL => 'Glen Small',
+ GMCCAR => 'Greg McCarroll',
+ GRIXON => 'Guy Rixon',
+ HDM => 'Dominic Mitchell',
+ HEX => 'Earle Martin',
+ HITHERTO => 'Simon Batistoni',
+ HVDS => 'Hugo van der Sanden',
+ IAINT => 'Iain Tatch',
+ ICLARK => 'Ian Clark',
+ IDORU => 'Russell Matbouli',
+ ITDEV => 'Bruce Mitchell',
+ JABLKO => 'Jack Bates',
+ JAGS => 'Jagdeep S. Sandhu',
+ JAMESPO => 'James Powell',
+ JARLE => 'Jarle Brinchmann',
+ JARW => 'John A.R. Williams',
+ JCTEBBAL => 'Jean-Claude Tebbal',
+ JDALLMAN => 'John Dallman',
+ JELLMAN => 'Jeremy Ellman',
+ JIMRIE => 'John Imrie',
+ JJGREEN => 'J.J. Green',
+ JMASTROS => 'James Mastros',
+ JMCNAMARA => 'John McNamara',
+ JNBROOKES => 'Jon Brookes',
+ JONALLEN => 'Jon Allen',
+ JONATHAN => 'Jonathan Worthington',
+ JONIONS => 'Julian Onions',
+ JROBINSON => 'Jess Robinson',
+ JSTOWE => 'Jonathan Stowe',
+ JULES => 'Jules Bean',
+ KAKE => 'Kake L Pugh',
+ KASEI => 'Marty Pauley',
+ KIM => 'Kim Rutherford',
+ KITE => 'Bradley Derek Kite',
+ KIZ => 'Ian Stuart',
+ KNEW => 'Jody Belka',
+ KONOBI => 'Scott McWhirter',
+ KPWATSON => 'Keith Watson',
+ KUNGFUFTR => 'Scott McWhirter',
+ LGODDARD => 'Lee Goddard',
+ LILSTEVEY => 'Steven Pitchford',
+ LLAP => 'Leo Lapworth',
+ LMJM => 'Lee McLoughlin',
+ LORDO => 'Lawrence Tierney',
+ MACDEE => 'Craig Macdonald',
+ MARKBUSH => 'Mark J Bush',
+ MARKD => 'Mark Daglish',
+ MARKF => 'Mark Fowler',
+ MART => 'Martin Atkins',
+ MARTINB => 'Martin Bartlett',
+ MARTINTO => 'Martin Tomes',
+ MATTBM => 'Matthew Byng-Maddick',
+ MAVIT => 'Peter Oliver',
+ MCNEWTON => 'Matthew C. Newton',
+ MEH => 'Andy Smith',
+ MFENTON => 'Mathew Fenton',
+ MGLEE => 'Martin Lee',
+ MICB => 'Malcolm Beattie',
+ MIKEJ => 'Mike Jones',
+ MIRK => 'Mike Taylor',
+ MJBRIGHT => 'Martin Bright',
+ MJG => 'Michael Gray',
+ MJM => 'Matt Mitchell',
+ MJS => 'Michael Smith',
+ MOHACSI => 'Janos Mohacsi',
+ MOOLI => 'Peter Corlett',
+ MOPOKE => 'Andy Kelk',
+ MPOCOCK => 'Matthew Pocock',
+ MRFELTON => 'Tom Kirkpatrick',
+ MRJC => 'Martin R.J. Cleaver',
+ MROWLANDS => 'Mark Rowlands',
+ MSERGEANT => 'MSERGEANT',
+ MSERSKINE => 'Michael Erskine',
+ MSTEVENS => 'Michael Stevens',
+ MSTROUT => 'Matt S Trout',
+ MTIRAMANI => 'Mark Tiramani',
+ MWARD => 'Martin Ward',
+ MWILSON => 'Matt Wilson',
+ NATHANL => 'Nathan Lewis',
+ NIGE => 'Nigel Hamilton',
+ NIGELM => 'Nigel Metheringham',
+ NIKC => 'Nik Clayton',
+ NOBULL => 'Brian McCauley',
+ NUANCE => 'Andrew Wilson',
+ NUTTALL => 'Richard Nuttall',
+ NWCLARK => 'Nicholas Clark',
+ NWETTERS => 'Nigel Wetters Gourlay',
+ NWILLIAMS => 'Nick Williams',
+ OKTAL => 'Mat Sutcliffe',
+ OLIVER => 'Oliver Gorwits',
+ OSFAMERON => 'osfameron',
+ OWHITE => 'Oliver White',
+ OWL => 'Rich Daley',
+ PAULM => 'Paul Makepeace',
+ PAULO => 'Paul Orrock',
+ PDCAWLEY => 'Piers Cawley',
+ PEDWARDS => 'Peter Edwards',
+ PENGUIN => 'K. James Cheetham',
+ PEVANS => 'Paul Evans',
+ PHILIPA => 'Philip Aston',
+ PJC => 'Peter Clay',
+ PJCJ => 'Paul Johnson',
+ PJFL => 'Peter Flanigan',
+ PJORDAN => 'Pete Jordan',
+ PLISTER => 'Peter Lister',
+ PMISON => 'Paul Mison',
+ PMOORE => 'Paul Moore',
+ PNE => 'Philip Newton',
+ PTALACKO => 'Paul Talacko',
+ RATAXIS => 'Joel Bernstein',
+ RCALEY => 'Richard Caley',
+ RCLAMP => 'Richard Clamp',
+ RECKON => 'Franck Latremoliere',
+ RED => 'Redvers Davies',
+ RGIFFORD => 'Richard Gifford',
+ RICH => 'Richard Dobson',
+ RICHDAWE => 'Richard Dawe',
+ RMBARKER => 'Robin Barker',
+ ROB => 'Rob Dixon',
+ ROBBIEBOW => 'Robbie Bow',
+ ROBIN => 'Robin Houston',
+ ROBINDAR => 'Robin Darby',
+ RORY => 'Rory Macdonald',
+ ROWLESD => 'Dan Rowles',
+ ROZALLIN => 'Rosellyne Thompson',
+ RSZEMETI => 'Robin Szemeti',
+ SAM => 'Simon Matthews',
+ SARGIE => 'Peter Sergeant',
+ SCHUBOE => 'Benjamin Schuster-Bockler',
+ SEB => 'Steven Brenner',
+ SENDU => 'Sendu Bala',
+ SHERWOOD => 'Steve Sherwood',
+ SHEVEK => 'Shevek',
+ SHILDREY => 'Stephen Hildrey',
+ SILASMONK => 'Nicholas Bamber',
+ SIMMONSA => 'Andrew Simmons',
+ SIMON => 'Simon Cozens',
+ SIMONMCC => 'Simon McCaughey',
+ SIMONW => 'Simon Wistow',
+ SJQUINNEY => 'Stephen Quinney',
+ SJZASADA => 'Stefan Zasada',
+ SKINGTON => 'Sam Kington',
+ SMPILL => 'Steve Pillinger',
+ SMULLIS => 'Simon Mullis',
+ SMYLERS => 'Smylers',
+ SNKWATT => 'Stuart Watt',
+ SOLIVER => 'Simon Oliver',
+ SRUSHE => 'Steve Rushe',
+ STEVEHA => 'Stephen Hardisty',
+ STIGPJE => 'Peter John Edwards',
+ STRYTOAST => 'Stray Taoist',
+ SUE => 'Sue Spence',
+ SWILCOX => 'Simon Wilcox',
+ TBURGESS => 'Trevor Burgess',
+ TCOX => 'Tony Cox',
+ TGROSE => 'Tony G. Rose',
+ THINCH => 'Timothy Hinchcliffe',
+ TIMB => 'Tim Bunce',
+ TIMBRODY => 'Tim Brody',
+ TIMPX => 'Tim Goodwin',
+ TKP => 'Tom Kirkpatrick',
+ TMTM => 'Tony Bowden',
+ TOBYINK => 'Toby Inkster',
+ TOMHUKINS => 'Tom Hukins',
+ TOMI => 'Tom Insam',
+ TWIBBLER => 'Trevor Ward',
+ WAYNEM => 'Wayne Myers',
+ WHITEB => 'Barry White',
+ WKEENAN => 'Wayne Keenan',
+ YODA => 'Jody Belka',
+ ZOOT => 'Owen Cliffe',
+ ZOZO => 'Theo Zourzouvillys',
+ ZZCGUMK => 'Mark Mc Keown',
+
+ # Gone, but not forgotten
+
+ IVORW => 'Ivor Williams (RIP)',
+ 'NI-S' => 'Nick Ing-Simmons (RIP)',
+);
+
+q<
+ United, united, united we stand
+ United we never shall fall
+ United, united, united we stand
+ United we stand one and all
+>
+
+
+__END__
+
+=encoding UTF-8
+
+=head1 NAME
+
+Acme::CPANAuthors::British - We are British CPAN authors
+
+=head1 SYNOPSIS
+
+ use Acme::CPANAuthors;
+
+ my $authors = Acme::CPANAuthors->new("British");
+
+ my $number = $authors->count;
+ my @ids = $authors->id;
+ my @distros = $authors->distributions("BARBIE");
+ my $url = $authors->avatar_url("BINGOS");
+ my $kwalitee = $authors->kwalitee("DAVORG");
+ my $name = $authors->name("DCANTRELL");
+
+=head1 DESCRIPTION
+
+This class provides a hash of British CPAN authors' PAUSE ID and name to be
+used with the C<Acme::CPANAuthors> module.
+
+This module was created simply because nobody had written it and uploaded it
+to CPAN before me :)
+
+=head1 MAINTENANCE
+
+If you are a British CPAN author not listed here, please send me your ID/name
+via email or RT so we can always keep this module up to date. If there's a
+mistake and you're listed here but are not British (or just don't want to be
+listed), sorry for the inconvenience: please contact me and I'll remove the
+entry right away.
+
+Please note that British implies that you consider yourself from England, Wales,
+Scotland or Northern Ireland.
+
+=head1 SEE ALSO
+
+L<Acme::CPANAuthors> - Main class to manipulate this one
+
+Other European authors:
+
+L<Acme::CPANAuthors::Austrian> - Austrian CPAN authors
+
+L<Acme::CPANAuthors::Dutch> - Dutch CPAN authors
+
+L<Acme::CPANAuthors::French> - French CPAN authors
+
+L<Acme::CPANAuthors::Portuguese> - Portuguese CPAN authors
+
+L<Acme::CPANAuthors::Italian> - Italian CPAN authors
+
+Or you could use the following to include them all:
+
+L<Acme::CPANAuthors::European> - European CPAN authors
+
+L<Acme::CPANAuthors::EU> - EU CPAN authors
+
+=head1 AUTHOR
+
+Barbie C<< <barbie at cpan.org> >>
+
+
+=head1 SUPPORT
+
+You can find documentation for this module with the perldoc command.
+
+ perldoc Acme::CPANAuthors::British
+
+You can also look for information at:
+
+=over 4
+
+=item * RT: CPAN's request tracker
+
+L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Acme-CPANAuthors-British>
+
+=item * AnnoCPAN: Annotated CPAN documentation
+
+L<http://annocpan.org/dist/Acme-CPANAuthors-British>
+
+=item * CPAN Ratings
+
+L<http://cpanratings.perl.org/d/Acme-CPANAuthors-British>
+
+=item * Search CPAN
+
+L<http://search.cpan.org/dist/Acme-CPANAuthors-British>
+
+=back
+
+=head1 ACKNOWLEDGEMENTS
+
+Thanks to Kenichi Ishigaki for writing C<Acme::CPANAuthors>, and Sébastien
+Aperghis-Tramoni for writing C<Acme::CPANAuthors::French> on which I based
+this release.
+
+I always wanted to release an Acme module :)
+
+=head1 COPYRIGHT & LICENSE
+
+Copyright 2009 Barbie for Miss Barbell Productions.
+
+This program is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
116 lib/Acme/CPANAuthors/British/Companies.pm
@@ -0,0 +1,116 @@
+package Acme::CPANAuthors::British::Companies;
+use strict;
+use warnings;
+
+{
+ no strict "vars";
+ $VERSION = "0.01";
+}
+
+use Acme::CPANAuthors::Register (
+ BBCIFL => 'BBC, Interactive Factual & Learning',
+ BBCPKENT => 'P Kent (BBC)',
+ BBCSIMONF => 'Simon Flack (BBC)',
+ BLACKSTAR => 'BlackStar',
+ CASTLE => 'Peter Goode/Castle Links Ltd',
+ FOTANGO => 'Fotango Ltd',
+ GMGRD => 'Guardian Media Group Regional Digital',
+ PROFERO => 'Profero Ltd.',
+);
+
+q<
+ recommended listening when using this module: Paramore - Misery Business
+>
+
+
+__END__
+
+=encoding UTF-8
+
+=head1 NAME
+
+Acme::CPANAuthors::British::Companies - We are British Companies with PAUSE IDs
+
+=head1 SYNOPSIS
+
+ use Acme::CPANAuthors;
+
+ my $authors = Acme::CPANAuthors->new("British::Companies");
+
+ my $number = $authors->count;
+ my @ids = $authors->id;
+ my @distros = $authors->distributions("FOTANGO");
+ my $url = $authors->avatar_url("PROFERO");
+ my $kwalitee = $authors->kwalitee("GMGRD");
+ my $name = $authors->name("BBCIFL");
+
+=head1 DESCRIPTION
+
+This class provides a hash of British Companies who have PAUSE IDs, to be used
+with the C<Acme::CPANAuthors> module.
+
+This module was created as an addition to the British CPANAuthors module, due
+to the number of British Companies that have decided to register their own
+PAUSE account.
+
+=head1 MAINTENANCE
+
+If you are a British Company with a PAUSE account not listed here, please send
+me your ID/name via email or RT, so I can always keep this module up to date.
+If there are any mistakes and you're listed here but are not a British Company
+(or just don't want to be listed), sorry for the inconvenience: please contact
+me as above and I'll remove the entry right away.
+
+Please note that British Company implies that the head office reside in
+England, Wales, Scotland or Northern Ireland.
+
+=head1 SEE ALSO
+
+L<Acme::CPANAuthors> - Main class to manipulate this one
+
+=head1 AUTHOR
+
+Barbie C<< <barbie at cpan.org> >>
+
+=head1 SUPPORT
+
+You can find documentation for this module with the perldoc command.
+
+ perldoc Acme::CPANAuthors::British::Companies
+
+You can also look for information at:
+
+=over 4
+
+=item * RT: CPAN's request tracker
+
+L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Acme-CPANAuthors-British>
+
+=item * AnnoCPAN: Annotated CPAN documentation
+
+L<http://annocpan.org/dist/Acme-CPANAuthors-British>
+
+=item * CPAN Ratings
+
+L<http://cpanratings.perl.org/d/Acme-CPANAuthors-British>
+
+=item * Search CPAN
+
+L<http://search.cpan.org/dist/Acme-CPANAuthors-British>
+
+=back
+
+=head1 ACKNOWLEDGEMENTS
+
+Thanks to Kenichi Ishigaki for writing C<Acme::CPANAuthors>, and Sébastien
+Aperghis-Tramoni for writing C<Acme::CPANAuthors::French> on which I based
+this release.
+
+=head1 COPYRIGHT & LICENSE
+
+Copyright 2009 Barbie for Miss Barbell Productions.
+
+This program is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
10 t/00load.t
@@ -0,0 +1,10 @@
+#!perl -T
+use strict;
+use Test::More tests => 2;
+
+BEGIN {
+ use_ok( "Acme::CPANAuthors::British" );
+ use_ok( "Acme::CPANAuthors::British::Companies" );
+}
+
+diag( "Testing Acme::CPANAuthors::British $Acme::CPANAuthors::British::VERSION, Perl $], $^X" );
54 t/10british.t
@@ -0,0 +1,54 @@
+#!perl
+use strict;
+use warnings;
+use Test::More;
+
+plan skip_all => "can't load Acme::CPANAuthors"
+ unless eval "use Acme::CPANAuthors; 1";
+plan tests => 11;
+
+my $authors = eval { Acme::CPANAuthors->new("British") };
+is( $@, "", "creating a new Acme::CPANAuthors object with British authors" );
+isa_ok( $authors, "Acme::CPANAuthors" );
+
+my $number = 238;
+is( $authors->count, $number, " .. \$authors->count matches current count" );
+
+my @ids = $authors->id;
+cmp_ok( ~~@ids, ">", 0, " .. \$authors->id gives a non-empty list" );
+is( ~~@ids, $number, " .. \$authors->id equals \$authors->count" );
+
+SKIP: {
+ skip "CPAN configuration not available", 6
+ unless eval "Acme::CPANAuthors::Utils::_cpan_authors_file() ; 1";
+
+ my @distros = $authors->distributions('BARBIE');
+ cmp_ok( ~~@distros, ">", 0, " .. \$authors->distributions('BARBIE') gives a non-empty list" );
+
+ @distros = $authors->distributions('XXXXXX');
+ cmp_ok( ~~@distros, "==", 0, " .. \$authors->distributions('XXXXXX') gives an empty list" );
+
+ my $url = $authors->avatar_url('BARBIE');
+ is($url, 'http://www.gravatar.com/avatar/2459f554c069e44527716e3f35e1d0d1', 'returns a URL' );
+
+ $url = $authors->avatar_url('BINGOS');
+ cmp_ok( length($url), ">", 0, " .. \$authors->avatar_url('BINGOS') gives a non-empty string" );
+
+ my $name = $authors->name('DCANTRELL');
+ cmp_ok( length($name), ">", 0, " .. \$authors->name('DCANTRELL') gives a non-empty string" );
+
+ SKIP: {
+ skip "cpants.perl.org is not available", 1
+ if(pingtest('cpants.perl.org'));
+
+ my $kwalitee = $authors->kwalitee('DAVORG');
+ isa_ok( $kwalitee, "HASH", " .. \$authors->kwalitee('DAVORG')" );
+ }
+}
+
+sub pingtest {
+ my $domain = shift || return 1;
+ system("ping -q -c 1 $domain >/dev/null 2>&1");
+ my $retcode = $? >> 8;
+ return $retcode;
+}
51 t/11companies.t
@@ -0,0 +1,51 @@
+#!perl
+use strict;
+use warnings;
+use Test::More;
+
+plan skip_all => "can't load Acme::CPANAuthors"
+ unless eval "use Acme::CPANAuthors; 1";
+plan tests => 10;
+
+my $authors = eval { Acme::CPANAuthors->new("British::Companies") };
+is( $@, "", "creating a new Acme::CPANAuthors object with British Companies" );
+isa_ok( $authors, "Acme::CPANAuthors" );
+
+my $number = 8;
+is( $authors->count, $number, " .. \$authors->count matches current count" );
+
+my @ids = $authors->id;
+cmp_ok( ~~@ids, ">", 0, " .. \$authors->id gives a non-empty list" );
+is( ~~@ids, $number, " .. \$authors->id equals \$authors->count" );
+
+SKIP: {
+ skip "CPAN configuration not available", 6
+ unless eval "Acme::CPANAuthors::Utils::_cpan_authors_file() ; 1";
+
+ my @distros = $authors->distributions('FOTANGO');
+ cmp_ok( ~~@distros, ">", 0, " .. \$authors->distributions('FOTANGO') gives a non-empty list" );
+
+ @distros = $authors->distributions('XXXXXX');
+ cmp_ok( ~~@distros, "==", 0, " .. \$authors->distributions('XXXXXX') gives an empty list" );
+
+ my $url = $authors->avatar_url('GMGRD');
+ cmp_ok( length($url), ">", 0, " .. \$authors->avatar_url('GMGRD') gives a non-empty string" );
+
+ my $name = $authors->name('GMGRD');
+ cmp_ok( length($name), ">", 0, " .. \$authors->name('GMGRD') gives a non-empty string" );
+
+ SKIP: {
+ skip "cpants.perl.org is not available", 1
+ if(pingtest('cpants.perl.org'));
+
+ my $kwalitee = $authors->kwalitee('BBCIFL');
+ isa_ok( $kwalitee, "HASH", " .. \$authors->kwalitee('BBCIFL')" );
+ }
+}
+
+sub pingtest {
+ my $domain = shift || return 1;
+ system("ping -q -c 1 $domain >/dev/null 2>&1");
+ my $retcode = $? >> 8;
+ return $retcode;
+}
14 t/90podtest.t
@@ -0,0 +1,14 @@
+#!perl -T
+use strict;
+use warnings;
+
+use Test::More;
+
+# Skip if doing a regular install
+plan skip_all => "Author tests not required for installation"
+ unless ( $ENV{AUTOMATED_TESTING} );
+
+eval "use Test::Pod 1.00";
+plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
+all_pod_files_ok();
+
13 t/91podcover.t
@@ -0,0 +1,13 @@
+#!perl -T
+use strict;
+use warnings;
+
+use Test::More;
+
+# Skip if doing a regular install
+plan skip_all => "Author tests not required for installation"
+ unless ( $ENV{AUTOMATED_TESTING} );
+
+eval "use Test::Pod::Coverage 0.08";
+plan skip_all => "Test::Pod::Coverage 0.08 required for testing POD coverage" if $@;
+all_pod_coverage_ok();
28 t/94metatest.t
@@ -0,0 +1,28 @@
+#!perl -T
+use strict;
+use warnings;
+
+use Test::More;
+
+# Skip if doing a regular install
+plan skip_all => "Author tests not required for installation"
+ unless ( $ENV{AUTOMATED_TESTING} );
+
+eval "use Test::CPAN::Meta 0.12";
+plan skip_all => "Test::CPAN::Meta 0.12 required for testing META.yml" if $@;
+
+plan 'no_plan';
+
+my $yaml = meta_spec_ok(undef,undef,@_);
+
+use Acme::CPANAuthors::British;
+
+is($yaml->{version},$Acme::CPANAuthors::British::VERSION,
+ 'META.yml distribution version matches');
+
+if($yaml->{provides}) {
+ for my $mod (keys %{$yaml->{provides}}) {
+ is($yaml->{provides}{$mod}{version},$Acme::CPANAuthors::British::VERSION,
+ "META.yml entry [$mod] version matches");
+ }
+}
24 t/95changedate.t
@@ -0,0 +1,24 @@
+#!perl -T
+use strict;
+use warnings;
+
+use Test::More;
+use IO::File;
+use Acme::CPANAuthors::British;
+
+# Skip if doing a regular install
+plan skip_all => "Author tests not required for installation"
+ unless ( $ENV{AUTOMATED_TESTING} );
+
+my $fh = IO::File->new('Changes','r') or plan skip_all => "Cannot open Changes file";
+
+plan 'no_plan';
+
+my $latest = 0;
+while(<$fh>) {
+ next unless(m!^\d!);
+ $latest = 1 if(m!^$Acme::CPANAuthors::British::VERSION!);
+ like($_, qr!\d[\d._]+\s+\d{2}/\d{2}/\d{4}!,'... version has a date');
+}
+
+is($latest,1,'... latest version not listed');
Please sign in to comment.
Something went wrong with that request. Please try again.