From: Peter Rabbitson Date: Tue, 24 May 2016 12:36:41 +0000 (+0200) Subject: Add permanent plumbing for _TempExtlib (d0435d75) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=399b9455;p=dbsrgits%2FDBIx-Class-Historic.git Add permanent plumbing for _TempExtlib (d0435d75) Since this is the second time we need this, there likely will be more down the road. Split the permanenet and temporary parts into two commits so reverting is less of a PITA. This commit contains the pieces that are perfectly fine to lay dormant until times we need _TempExtlib --- diff --git a/.gitignore b/.gitignore index c8cda3e..81d2445 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ t/var/ *~ maint/.Generated_Pod examples/Schema/db + +lib/DBIx/Class/_TempExtlib diff --git a/lib/DBIx/Class/StartupCheck.pm b/lib/DBIx/Class/StartupCheck.pm index dff403b..4986eb5 100644 --- a/lib/DBIx/Class/StartupCheck.pm +++ b/lib/DBIx/Class/StartupCheck.pm @@ -1,8 +1,5 @@ package DBIx::Class::StartupCheck; -use strict; -use warnings; - 1; __END__ diff --git a/lib/DBIx/Class/_Util.pm b/lib/DBIx/Class/_Util.pm index 3f60d3f..a20705d 100644 --- a/lib/DBIx/Class/_Util.pm +++ b/lib/DBIx/Class/_Util.pm @@ -1,6 +1,8 @@ package # hide from PAUSE DBIx::Class::_Util; +use DBIx::Class::StartupCheck; # load es early as we can, usually a noop + use warnings; use strict; diff --git a/maint/careless_ssh.bash b/maint/careless_ssh.bash new file mode 100755 index 0000000..1b9e0bc --- /dev/null +++ b/maint/careless_ssh.bash @@ -0,0 +1,3 @@ +#!/bin/bash + +/usr/bin/ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "$@" diff --git a/maint/gen_pod_inherit b/maint/gen_pod_inherit index e441e88..4164da6 100755 --- a/maint/gen_pod_inherit +++ b/maint/gen_pod_inherit @@ -47,6 +47,7 @@ Pod::Inherit->new({ lib/DBIx/Class/DB.pm lib/DBIx/Class/CDBICompat/ lib/DBIx/Class/CDBICompat.pm + lib/DBIx/Class/_TempExtlib/ ), # skip the ::Storage:: family for now qw( diff --git a/t/00describe_environment.t b/t/00describe_environment.t index 37e3da9..e24249f 100644 --- a/t/00describe_environment.t +++ b/t/00describe_environment.t @@ -167,6 +167,8 @@ find({ wanted => sub { -f $_ or return; + $_ =~ m|lib/DBIx/Class/_TempExtlib| and return; + # can't just `require $fn`, as we need %INC to be # populated properly my ($mod) = $_ =~ /^ lib [\/\\] (.+) \.pm $/x diff --git a/xt/dist/loadable_standalone_testschema_resultclasses.t b/xt/dist/loadable_standalone_testschema_resultclasses.t index 5416df8..95dd24f 100644 --- a/xt/dist/loadable_standalone_testschema_resultclasses.t +++ b/xt/dist/loadable_standalone_testschema_resultclasses.t @@ -15,7 +15,7 @@ use File::Find; my $worker = sub { my $fn = shift; - if (my @offenders = grep { $_ !~ m{DBIx/Class/(?:_Util|Carp)\.pm} } grep { $_ =~ /(^|\/)DBI/ } keys %INC) { + if (my @offenders = grep { $_ !~ m{DBIx/Class/(?:_Util|Carp|StartupCheck)\.pm} } grep { $_ =~ /(^|\/)DBI/ } keys %INC) { die "Wtf - DBI* modules present in %INC: @offenders"; } diff --git a/xt/dist/pod_coverage.t b/xt/dist/pod_coverage.t index 4505af4..b98a555 100644 --- a/xt/dist/pod_coverage.t +++ b/xt/dist/pod_coverage.t @@ -116,6 +116,8 @@ my $exceptions = { /] }, + 'DBIx::Class::_TempExtlib*' => { skip => 1 }, + 'DBIx::Class::Admin::*' => { skip => 1 }, 'DBIx::Class::ClassResolver::PassThrough' => { skip => 1 }, 'DBIx::Class::Componentised' => { skip => 1 }, diff --git a/xt/dist/postdistdir/pod_footers.t b/xt/dist/postdistdir/pod_footers.t index 4b14ded..ee2ac9d 100644 --- a/xt/dist/postdistdir/pod_footers.t +++ b/xt/dist/postdistdir/pod_footers.t @@ -29,6 +29,7 @@ find({ return unless -f $fn; return unless $fn =~ / \. (?: pm | pod ) $ /ix; + return if $fn =~ qr{\Qlib/DBIx/Class/_TempExtlib/}; my $data = slurp_bytes $fn; diff --git a/xt/dist/strictures.t b/xt/dist/strictures.t index c896c95..93feda8 100644 --- a/xt/dist/strictures.t +++ b/xt/dist/strictures.t @@ -46,6 +46,10 @@ find({ t/lib/ANFANG.pm # no stictures by design (load speed sensitive) | lib/DBIx/Class/Optional/Dependencies.pm # no stictures by design (load speed sensitive) + | + lib/DBIx/Class/StartupCheck.pm # no stictures by design (load speed sensitive) + | + lib/DBIx/Class/_TempExtlib/.+ )$}x; my $f = $_; diff --git a/xt/extra/internals/namespaces_cleaned.t b/xt/extra/internals/namespaces_cleaned.t index 36e12b1..8584bd3 100644 --- a/xt/extra/internals/namespaces_cleaned.t +++ b/xt/extra/internals/namespaces_cleaned.t @@ -208,6 +208,7 @@ sub find_modules { find( { wanted => sub { -f $_ or return; + $_ =~ m|lib/DBIx/Class/_TempExtlib| and return; s/\.pm$// or return; s/^ (?: lib | blib . (?:lib|arch) ) . //x; push @modules, join ('::', File::Spec->splitdir($_)); diff --git a/xt/extra/internals/optional_deps.t b/xt/extra/internals/optional_deps.t index de45ae0..c1aa96e 100644 --- a/xt/extra/internals/optional_deps.t +++ b/xt/extra/internals/optional_deps.t @@ -20,6 +20,9 @@ use List::Util 'shuffle'; use Config; SKIP: { + skip 'Lean load pattern testing makes no sense with TempExtlib', 1 + if grep { $_ =~ /TempExtlib/ } @INC; + skip 'Lean load pattern testing unsafe with $ENV{PERL5OPT}', 1 if $ENV{PERL5OPT};