Skip to content

Commit

Permalink
Updates / additions for how I do dists
Browse files Browse the repository at this point in the history
  • Loading branch information
bobtfish committed Dec 3, 2009
1 parent e67d57c commit db1a1bd
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 20 deletions.
9 changes: 5 additions & 4 deletions Makefile.PL
@@ -1,14 +1,15 @@
use inc::Module::Install;
use strict;
use warnings;
use inc::Module::Install 0.91;

name('CatalystX-Starter');
all_from('lib/CatalystX/Starter.pm');

requires 'Catalyst::Runtime';
requires 'Catalyst::Devel';
requires 'Test::More';
requires 'ok';
requires 'Test::Pod';
requires 'Test::Pod::Coverage';
requires 'Test::Pod' => '1.14';
requires 'Test::Pod::Coverage' => '1.04';
requires 'File::ShareDir';
requires 'File::Copy::Recursive';
requires 'File::Slurp';
Expand Down
1 change: 1 addition & 0 deletions data/MANIFEST.SKIP
Expand Up @@ -6,3 +6,4 @@ MANIFEST.SKIP~
cover_db
Makefile$
Makefile.old$
^[% DIST_NAME %]-
26 changes: 22 additions & 4 deletions data/Makefile.PL
@@ -1,11 +1,29 @@
use inc::Module::Install;
use strict;
use warnings;
use inc::Module::Install 0.91;
use Module::Install::AuthorRequires;
use Module::Install::AuthorTests;

name '[% DIST_NAME %]';
all_from '[% MAIN_MODULE_PATH %]';

build_requires 'Catalyst::Runtime';
requires 'Moose';
requires 'namespace::autoclean';

build_requires 'Catalyst::Runtime' => '5.80';
build_requires 'Test::WWW::Mechanize::Catalyst';
build_requires 'Test::More';
build_requires 'ok';
build_requires 'Test::More' => '0.88';

author_requires 'Test::Pod::Coverage' => '1.04';
author_requires 'Test::Pod' => '1.14';

author_tests 't/author';

resources repository => 'git://somewhere.com/myproject.git';

if ($Module::Install::AUTHOR) {
system("pod2text [% MAIN_MODULE_PATH %] > README")
and die $!;
}

WriteAll();
1 change: 1 addition & 0 deletions data/gitignore
Expand Up @@ -6,3 +6,4 @@ inc
pm_to_blib
MANIFEST
Makefile.old
[% DIST_NAME %]-*
6 changes: 4 additions & 2 deletions data/t/00-load.t
Expand Up @@ -2,5 +2,7 @@

use strict;
use warnings;
use Test::More tests => 1;
use ok '[% MODULE %]';
use Test::More;
use_ok '[% MODULE %]';

done_testing;
7 changes: 4 additions & 3 deletions data/t/author/pod-coverage.t
@@ -1,6 +1,7 @@
#!perl -T
#!/usr/bin/env perl

use strict;
use warnings;
use Test::More;
eval "use Test::Pod::Coverage 1.04";
plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
use Test::Pod::Coverage 1.04;
all_pod_coverage_ok();
7 changes: 4 additions & 3 deletions data/t/author/pod.t
@@ -1,6 +1,7 @@
#!perl -T
#!/usr/bin/env perl

use strict;
use warnings;
use Test::More;
eval "use Test::Pod 1.14";
plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
use Test::Pod 1.14;
all_pod_files_ok();
3 changes: 2 additions & 1 deletion data/t/live-test.t
Expand Up @@ -2,7 +2,7 @@

use strict;
use warnings;
use Test::More tests => 3;
use Test::More;

# setup library path
use FindBin qw($Bin);
Expand All @@ -17,3 +17,4 @@ my $mech = Test::WWW::Mechanize::Catalyst->new;
$mech->get_ok('http://localhost/', 'get main page');
$mech->content_like(qr/it works/i, 'see if it has our text');

done_testing;
21 changes: 18 additions & 3 deletions lib/CatalystX/Starter.pm
Expand Up @@ -89,16 +89,31 @@ sub _mk_module {

my $data = <<"MOD"; # indented to prevent pod parser from parsing it
package $module;
use strict;
use warnings;
use Moose;
use namespace::autoclean;
1;
=head1 NAME
$module -
=head1 DESCRIPTION
=head1 METHODS
=head1 BUGS
=head1 AUTHOR
=head1 COPYRIGHT & LICENSE
Copyright 2009 the above author(s).
This sofware is free software, and is licensed under the same terms as perl itself.
=cut
1;
MOD

$data =~ s/^ //mg; # cleanup the leading space
Expand Down

0 comments on commit db1a1bd

Please sign in to comment.