From: Peter Rabbitson Date: Fri, 14 Dec 2012 09:10:14 +0000 (+0100) Subject: Since .generated_pod is no longer shipped in-dist, move it to maint/ X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=95252a8cb02e0d6fb5914d02a782bd3e1b20c882;p=dbsrgits%2FDBIx-Class-Historic.git Since .generated_pod is no longer shipped in-dist, move it to maint/ --- diff --git a/.generated_pod/.git_placeholder b/.generated_pod/.git_placeholder deleted file mode 100644 index e69de29..0000000 diff --git a/.gitignore b/.gitignore index 94a2aec..80fc61d 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,4 @@ t/var/ *# .#* *~ -.generated_pod/DBIx +maint/.Generated_Pod diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP index aeae5c6..5f0567e 100644 --- a/MANIFEST.SKIP +++ b/MANIFEST.SKIP @@ -27,3 +27,4 @@ \.rej$ lib/DBIx/Class/Manual/ResultClass.pod.proto +maint/.Generated_Pod diff --git a/maint/Makefile.PL.inc/53_autogen_pod.pl b/maint/Makefile.PL.inc/53_autogen_pod.pl index c085a51..1119c7f 100644 --- a/maint/Makefile.PL.inc/53_autogen_pod.pl +++ b/maint/Makefile.PL.inc/53_autogen_pod.pl @@ -1,15 +1,22 @@ +use File::Path(); +use File::Glob(); + # leftovers in old checkouts unlink 'lib/DBIx/Class/Optional/Dependencies.pod' if -f 'lib/DBIx/Class/Optional/Dependencies.pod'; +File::Path::rmtree( File::Glob::bsd_glob('.generated_pod'), { verbose => 0 } ) + if -d '.generated_pod'; -my $pod_dir = '.generated_pod'; +my $pod_dir = 'maint/.Generated_Pod'; my $ver = Meta->version; # cleanup the generated pod dir (again - kill leftovers from old checkouts) -require File::Path; -require File::Glob; -File::Path::rmtree( File::Glob::bsd_glob("$pod_dir/*"), { verbose => 0 } ); - +if (-d $pod_dir) { + File::Path::rmtree( File::Glob::bsd_glob("$pod_dir/*"), { verbose => 0 } ); +} +else { + mkdir $pod_dir or die "Unable to create $pod_dir: $!"; +} # generate the OptDeps pod both in the clone-dir and during the makefile distdir { @@ -46,7 +53,7 @@ EOP } -# copy the contents of .generated_pod over to lib/ +# copy the contents of $pod_dir over to lib/ # (yes, overwriting is fine, though nothing should reside there) { postamble <<"EOP"; @@ -54,21 +61,21 @@ EOP clonedir_post_generate_files : dbic_clonedir_copy_generated_pod dbic_clonedir_copy_generated_pod : -\t\$(RM_F) .generated_pod/.packlist -\t\$(ABSPERLRUN) -MExtUtils::Install -e 'install([ from_to => {qw(.generated_pod/DBIx lib/DBIx write .generated_pod/.packlist)}, verbose => 0, uninstall_shadows => 0, skip => [] ]);' +\t\$(RM_F) $pod_dir.packlist +\t\$(ABSPERLRUN) -MExtUtils::Install -e 'install([ from_to => {qw($pod_dir lib write $pod_dir.packlist)}, verbose => 0, uninstall_shadows => 0, skip => [] ]);' EOP } -# everything that came from .generated_pod, needs to be removed from our lib/ +# everything that came from $pod_dir, needs to be removed from our lib/ { postamble <<"EOP"; clonedir_cleanup_generated_files : dbic_clonedir_cleanup_generated_pod_copies dbic_clonedir_cleanup_generated_pod_copies : -\t\$(ABSPERLRUN) -MExtUtils::Install -e 'uninstall(qw(.generated_pod/.packlist))' +\t\$(ABSPERLRUN) -MExtUtils::Install -e 'uninstall(qw($pod_dir.packlist))' EOP } diff --git a/maint/gen_pod_inherit b/maint/gen_pod_inherit index f5532a8..d50eae9 100755 --- a/maint/gen_pod_inherit +++ b/maint/gen_pod_inherit @@ -4,7 +4,7 @@ use warnings; use strict; my $lib_dir = 'lib'; -my $pod_dir = '.generated_pod'; +my $pod_dir = 'maint/.Generated_Pod'; my $result_metapod_fn = "$lib_dir/DBIx/Class/Manual/ResultClass.pod"; diff --git a/xt/eol.t b/xt/eol.t index d5e9d42..221bce4 100644 --- a/xt/eol.t +++ b/xt/eol.t @@ -14,7 +14,7 @@ unless ( DBIx::Class::Optional::Dependencies->req_ok_for ('test_eol') ) { } Test::EOL::all_perl_files_ok({ trailing_whitespace => 1 }, - qw/t xt lib script examples maint .generated_pod/, + qw/t xt lib script examples maint/, ); # Changes is not a "perl file", hence checked separately diff --git a/xt/notabs.t b/xt/notabs.t index e9ab916..3ddea64 100644 --- a/xt/notabs.t +++ b/xt/notabs.t @@ -14,7 +14,7 @@ unless ( DBIx::Class::Optional::Dependencies->req_ok_for ('test_notabs') ) { } Test::NoTabs::all_perl_files_ok( - qw/t xt lib script examples maint .generated_pod/, + qw/t xt lib script examples maint/, ); # Changes is not a "perl file", hence checked separately diff --git a/xt/pod.t b/xt/pod.t index 93cdb3f..f79cbae 100644 --- a/xt/pod.t +++ b/xt/pod.t @@ -13,4 +13,5 @@ unless ( DBIx::Class::Optional::Dependencies->req_ok_for ('test_pod') ) { : plan skip_all => "Test needs: $missing" } -Test::Pod::all_pod_files_ok(qw( .generated_pod lib )); +my $generated_pod_dir = 'maint/.Generated_Pod'; +Test::Pod::all_pod_files_ok( 'lib', -d $generated_pod_dir ? $generated_pod_dir : () ); diff --git a/xt/podcoverage.t b/xt/podcoverage.t index 71ec4de..40041ac 100644 --- a/xt/podcoverage.t +++ b/xt/podcoverage.t @@ -3,7 +3,7 @@ use strict; use Test::More; use List::Util 'first'; -use lib qw(t/lib .generated_pod); +use lib qw(t/lib maint/.Generated_Pod); use DBICTest; use namespace::clean;