_build/
blib/
inc/
-lib/DBIx/Class/Optional/Dependencies.pod
DBIx-Class-*/
DBIx-Class-*.tar.*
pm_to_blib
*#
.#*
*~
+.generated_pod/*
-^(?!script/|examples/|lib/|inc/|t/|xt/|Makefile\.PL$|maint/|README$|MANIFEST$|Changes$|META\.(?:yml|json)$)
+^(?!script/|examples/|lib/|inc/|t/|xt/|Makefile\.PL$|maint/|.generated_pod/|README$|MANIFEST$|Changes$|META\.(?:yml|json)$)
# Avoid version control files.
\bRCS\b
$Module::Install::AUTHOR = 0 if (grep { $ENV{"PERL5_${_}_IS_RUNNING"} } (qw/CPANM CPANPLUS CPAN/) );
}
+homepage 'http://www.dbix-class.org/';
+resources 'IRC' => 'irc://irc.perl.org/#dbix-class';
+resources 'license' => 'http://dev.perl.org/licenses/';
+resources 'repository' => 'https://github.com/dbsrgits/DBIx-Class';
+resources 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class';
+resources 'bugtracker' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=DBIx-Class';
+
name 'DBIx-Class';
perl_version '5.008001';
all_from 'lib/DBIx/Class.pm';
script/dbicadmin
|);
-homepage 'http://www.dbix-class.org/';
-resources 'IRC' => 'irc://irc.perl.org/#dbix-class';
-resources 'license' => 'http://dev.perl.org/licenses/';
-resources 'repository' => 'https://github.com/dbsrgits/DBIx-Class';
-resources 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class';
-resources 'bugtracker' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=DBIx-Class';
+makemaker_args(
+ PMLIBDIRS => [qw(lib .generated_pod)],
+ PMLIBPARENTDIRS => [qw(lib .generated_pod)],
+);
###
### DO NOT ADD OPTIONAL DEPENDENCIES HERE, EVEN AS recommends()
# This is to be called by the author only (automatically in Makefile.PL)
sub _gen_pod {
- my ($class, $distver) = @_;
+ my ($class, $distver, $pod_dir) = @_;
- my $modfn = __PACKAGE__ . '.pm';
- $modfn =~ s/\:\:/\//g;
-
- my $podfn = __FILE__;
- $podfn =~ s/\.pm$/\.pod/;
+ die "No POD root dir supplied" unless $pod_dir;
$distver ||=
eval { require DBIx::Class; DBIx::Class->VERSION; }
"\n\n---------------------------------------------------------------------\n"
;
+ # do not ask for a recet version, use 1.x API calls
+ # this *may* execute on a smoker with old perl or whatnot
+ require File::Path;
+
+ (my $modfn = __PACKAGE__ . '.pm') =~ s|::|/|g;
+
+ (my $podfn = "$pod_dir/$modfn") =~ s/\.pm$/\.pod/;
+ (my $dir = $podfn) =~ s|/[^/]+$||;
+
+ File::Path::mkpath([$dir]);
+
my $sqltver = $class->req_list_for ('deploy')->{'SQL::Translator'}
or die "Hrmm? No sqlt dep?";
open (my $fh, '>', $podfn) or Carp::croak "Unable to write to $podfn: $!";
print $fh join ("\n\n", @chunks);
+ print $fh "\n";
close ($fh);
}
+# leftovers in old checkouts
+unlink 'lib/DBIx/Class/Optional/Dependencies.pod'
+ if -f 'lib/DBIx/Class/Optional/Dependencies.pod';
+
+my $pod_dir = '.generated_pod';
+
# generate the pod as both a clone-dir step, and a makefile distdir step
my $ver = Meta->version;
print "Regenerating Optional/Dependencies.pod\n";
require DBIx::Class::Optional::Dependencies;
-DBIx::Class::Optional::Dependencies->_gen_pod ($ver);
+DBIx::Class::Optional::Dependencies->_gen_pod ($ver, $pod_dir);
postamble <<"EOP";
create_distdir : dbic_clonedir_gen_optdeps_pod
dbic_clonedir_gen_optdeps_pod :
-\t\$(ABSPERL) -Ilib -MDBIx::Class::Optional::Dependencies -e 'DBIx::Class::Optional::Dependencies->_gen_pod($ver)'
+\t\$(ABSPERL) -Ilib -MDBIx::Class::Optional::Dependencies -e "DBIx::Class::Optional::Dependencies->_gen_pod(qw($ver $pod_dir))"
EOP
-
# keep the Makefile.PL eval happy
1;
}
Test::EOL::all_perl_files_ok({ trailing_whitespace => 1 },
- qw/t xt lib script examples maint/,
+ qw/t xt lib script examples maint .generated_pod/,
);
# Changes is not a "perl file", hence checked separately
}
Test::NoTabs::all_perl_files_ok(
- qw/t xt lib script examples maint/,
+ qw/t xt lib script examples maint .generated_pod/,
);
# Changes is not a "perl file", hence checked separately
: plan skip_all => "Test needs: $missing"
}
-Test::Pod::all_pod_files_ok();
+Test::Pod::all_pod_files_ok(qw( .generated_pod lib ));
use Test::More;
use List::Util 'first';
-use lib qw(t/lib);
+use lib qw(t/lib .generated_pod);
use DBICTest;
use namespace::clean;
$ex_lookup->{$re} = $ex;
}
-my @modules = sort { $a cmp $b } (Test::Pod::Coverage::all_modules());
+my @modules = sort { $a cmp $b } Test::Pod::Coverage::all_modules('lib');
foreach my $module (@modules) {
SKIP: {