From: Kieren Diment Date: Thu, 16 Feb 2012 10:47:40 +0000 (+1100) Subject: module skeleton X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual-Monthly.git;a=commitdiff_plain;h=7784ea9293ebf82771faf64424524b497d41b97e module skeleton --- 7784ea9293ebf82771faf64424524b497d41b97e diff --git a/Changes b/Changes new file mode 100644 index 0000000..dffe373 --- /dev/null +++ b/Changes @@ -0,0 +1,5 @@ +Revision history for Catalyst-Manual-Monthly + +0.01 Date/time + First version, released on an unsuspecting world. + diff --git a/MANIFEST b/MANIFEST new file mode 100644 index 0000000..b92f8c9 --- /dev/null +++ b/MANIFEST @@ -0,0 +1,9 @@ +Changes +lib/Catalyst/Manual/Monthly.pm +Makefile.PL +MANIFEST This list of files +README +t/00-load.t +t/manifest.t +t/pod-coverage.t +t/pod.t diff --git a/Makefile.PL b/Makefile.PL new file mode 100644 index 0000000..d727f90 --- /dev/null +++ b/Makefile.PL @@ -0,0 +1,13 @@ +use inc::Module::Install; + +name 'Catalyst-Manual-Monthly'; +all_from 'lib/Catalyst/Manual/Monthly.pm'; +author q{Kieren Diment }; +license 'perl'; + +build_requires 'Test::More'; + +auto_install; + +WriteAll; + diff --git a/README b/README new file mode 100644 index 0000000..8ee869a --- /dev/null +++ b/README @@ -0,0 +1,13 @@ +Catalyst-Manual-Monthly + +This is repository for the monthly articles which replace the Catalyst +Advent Calendar. Following the Catalyst philosophy, the Catalyst monthly +doesn't use Catalyst it uses the CPAN toolchain to achieve its aims. +Occasionally a catalyst application (e.g. Metacpan) might be used for +system integration tasks. + +Articles are stored in directories as with: +lib/Catalyst/Monthly/[Year]/[Month]/[SomeDescriptiveFilename].pod + +In due course an RSS scraper will be written to facilitate notifications of +publication of new articles and edits to old articles. \ No newline at end of file diff --git a/ignore.txt b/ignore.txt new file mode 100644 index 0000000..ae1f0a4 --- /dev/null +++ b/ignore.txt @@ -0,0 +1,12 @@ +blib* +Makefile +Makefile.old +Build +Build.bat +_build* +pm_to_blib* +*.tar.gz +.lwpcookies +cover_db +pod2htm*.tmp +Catalyst-Manual-Monthly-* diff --git a/lib/Catalyst/Manual/#Monthly.pm# b/lib/Catalyst/Manual/#Monthly.pm# new file mode 100644 index 0000000..66592f4 --- /dev/null +++ b/lib/Catalyst/Manual/#Monthly.pm# @@ -0,0 +1,60 @@ +package Catalyst::Manual::Monthly; +use strict; +use warnings; + +our $VERSION = '0.01'; + +=head1 NAME + +Catalyst::Manual::Monthly + +This is repository for the monthly articles which replace the Catalyst +Advent Calendar. Following the Catalyst philosophy, the Catalyst monthly +doesn't use Catalyst it uses the CPAN toolchain to achieve its aims. +Occasionally a catalyst application (e.g. Metacpan) might be used for +system integration tasks. + +Articles are stored in directories as with: +lib/Catalyst/Monthly/[Year]/[Month]/[SomeDescriptiveFilename].pod + +In due course an RSS scraper will be written to facilitate notifications of +publication of new articles and edits to old articles. + +=head1 AUTHOR + +Catalyst Documentation Team + + and others. + +=head1 BUGS + +Please report any bugs or requests to C, or through the web interface at +L. +I will be notified, and then you'll automatically be notified of progress +on your bug as I make changes. + +=head2 Contributions + +Submit contributions via the RT queue above, or by bugging people on #catalyst on irc.perl.org. + + +=head1 ACKNOWLEDGEMENTS + +Catalyst Core developer team, past and present, catalyst contributors, and +the CPAN toolchain hackers. + +=head1 LICENSE AND COPYRIGHT + +Copyright 2012 Catalyst Documentation team + +This documentation can be redistributed under the terms of either: the GNU +General Public License as published by the Free Software Foundation; or the +Artistic License. + +See http://dev.perl.org/licenses/ for more information. + + +=cut + +1; # End of Catalyst::Manual::Monthly diff --git a/lib/Catalyst/Manual/.#Monthly.pm b/lib/Catalyst/Manual/.#Monthly.pm new file mode 120000 index 0000000..88e2db0 --- /dev/null +++ b/lib/Catalyst/Manual/.#Monthly.pm @@ -0,0 +1 @@ +kd@fenchurch-3.local.49965 \ No newline at end of file diff --git a/lib/Catalyst/Manual/Monthly.pm b/lib/Catalyst/Manual/Monthly.pm new file mode 100644 index 0000000..66592f4 --- /dev/null +++ b/lib/Catalyst/Manual/Monthly.pm @@ -0,0 +1,60 @@ +package Catalyst::Manual::Monthly; +use strict; +use warnings; + +our $VERSION = '0.01'; + +=head1 NAME + +Catalyst::Manual::Monthly + +This is repository for the monthly articles which replace the Catalyst +Advent Calendar. Following the Catalyst philosophy, the Catalyst monthly +doesn't use Catalyst it uses the CPAN toolchain to achieve its aims. +Occasionally a catalyst application (e.g. Metacpan) might be used for +system integration tasks. + +Articles are stored in directories as with: +lib/Catalyst/Monthly/[Year]/[Month]/[SomeDescriptiveFilename].pod + +In due course an RSS scraper will be written to facilitate notifications of +publication of new articles and edits to old articles. + +=head1 AUTHOR + +Catalyst Documentation Team + + and others. + +=head1 BUGS + +Please report any bugs or requests to C, or through the web interface at +L. +I will be notified, and then you'll automatically be notified of progress +on your bug as I make changes. + +=head2 Contributions + +Submit contributions via the RT queue above, or by bugging people on #catalyst on irc.perl.org. + + +=head1 ACKNOWLEDGEMENTS + +Catalyst Core developer team, past and present, catalyst contributors, and +the CPAN toolchain hackers. + +=head1 LICENSE AND COPYRIGHT + +Copyright 2012 Catalyst Documentation team + +This documentation can be redistributed under the terms of either: the GNU +General Public License as published by the Free Software Foundation; or the +Artistic License. + +See http://dev.perl.org/licenses/ for more information. + + +=cut + +1; # End of Catalyst::Manual::Monthly diff --git a/t/00-load.t b/t/00-load.t new file mode 100644 index 0000000..c85615f --- /dev/null +++ b/t/00-load.t @@ -0,0 +1,9 @@ +#!perl -T + +use Test::More tests => 1; + +BEGIN { + use_ok( 'Catalyst::Manual::Monthly' ) || print "Bail out!\n"; +} + +diag( "Testing Catalyst::Manual::Monthly $Catalyst::Manual::Monthly::VERSION, Perl $], $^X" ); diff --git a/t/boilerplate.t b/t/boilerplate.t new file mode 100644 index 0000000..77d2f7d --- /dev/null +++ b/t/boilerplate.t @@ -0,0 +1,56 @@ +#!perl -T + +use 5.006; +use strict; +use warnings; +use Test::More tests => 3; + +sub not_in_file_ok { + my ($filename, %regex) = @_; + open( my $fh, '<', $filename ) + or die "couldn't open $filename for reading: $!"; + + my %violated; + + while (my $line = <$fh>) { + while (my ($desc, $regex) = each %regex) { + if ($line =~ $regex) { + push @{$violated{$desc}||=[]}, $.; + } + } + } + + if (%violated) { + fail("$filename contains boilerplate text"); + diag "$_ appears on lines @{$violated{$_}}" for keys %violated; + } else { + pass("$filename contains no boilerplate text"); + } +} + +sub module_boilerplate_ok { + my ($module) = @_; + not_in_file_ok($module => + 'the great new $MODULENAME' => qr/ - The great new /, + 'boilerplate description' => qr/Quick summary of what the module/, + 'stub function definition' => qr/function[12]/, + ); +} + +TODO: { + local $TODO = "Need to replace the boilerplate text"; + + not_in_file_ok(README => + "The README is used..." => qr/The README is used/, + "'version information here'" => qr/to provide version information/, + ); + + not_in_file_ok(Changes => + "placeholder date/time" => qr(Date/time) + ); + + module_boilerplate_ok('lib/Catalyst/Manual/Monthly.pm'); + + +} + diff --git a/t/manifest.t b/t/manifest.t new file mode 100644 index 0000000..45eb83f --- /dev/null +++ b/t/manifest.t @@ -0,0 +1,13 @@ +#!perl -T + +use strict; +use warnings; +use Test::More; + +unless ( $ENV{RELEASE_TESTING} ) { + plan( skip_all => "Author tests not required for installation" ); +} + +eval "use Test::CheckManifest 0.9"; +plan skip_all => "Test::CheckManifest 0.9 required" if $@; +ok_manifest(); diff --git a/t/pod-coverage.t b/t/pod-coverage.t new file mode 100644 index 0000000..fc40a57 --- /dev/null +++ b/t/pod-coverage.t @@ -0,0 +1,18 @@ +use strict; +use warnings; +use Test::More; + +# Ensure a recent version of Test::Pod::Coverage +my $min_tpc = 1.08; +eval "use Test::Pod::Coverage $min_tpc"; +plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage" + if $@; + +# Test::Pod::Coverage doesn't require a minimum Pod::Coverage version, +# but older versions don't recognize some common documentation styles +my $min_pc = 0.18; +eval "use Pod::Coverage $min_pc"; +plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage" + if $@; + +all_pod_coverage_ok(); diff --git a/t/pod.t b/t/pod.t new file mode 100644 index 0000000..ee8b18a --- /dev/null +++ b/t/pod.t @@ -0,0 +1,12 @@ +#!perl -T + +use strict; +use warnings; +use Test::More; + +# Ensure a recent version of Test::Pod +my $min_tp = 1.22; +eval "use Test::Pod $min_tp"; +plan skip_all => "Test::Pod $min_tp required for testing POD" if $@; + +all_pod_files_ok();