Permalink
Browse files

Since .generated_pod is no longer shipped in-dist, move it to maint/

  • Loading branch information...
1 parent a0c96f2 commit 95252a8cb02e0d6fb5914d02a782bd3e1b20c882 @ribasushi ribasushi committed Dec 14, 2012
Showing with 25 additions and 16 deletions.
  1. 0 .generated_pod/.git_placeholder
  2. +1 −1 .gitignore
  3. +1 −0 MANIFEST.SKIP
  4. +17 −10 maint/Makefile.PL.inc/53_autogen_pod.pl
  5. +1 −1 maint/gen_pod_inherit
  6. +1 −1 xt/eol.t
  7. +1 −1 xt/notabs.t
  8. +2 −1 xt/pod.t
  9. +1 −1 xt/podcoverage.t
No changes.
View
@@ -17,4 +17,4 @@ t/var/
*#
.#*
*~
-.generated_pod/DBIx
+maint/.Generated_Pod
View
@@ -27,3 +27,4 @@
\.rej$
lib/DBIx/Class/Manual/ResultClass.pod.proto
+maint/.Generated_Pod
@@ -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,29 +53,29 @@
}
-# 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";
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
}
@@ -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";
View
@@ -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
View
@@ -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
View
@@ -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 : () );
View
@@ -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;

0 comments on commit 95252a8

Please sign in to comment.