Skip to content

Commit

Permalink
Add permanent plumbing for _TempExtlib (d0435d7)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ribasushi committed May 24, 2016
1 parent 58b92e3 commit 399b945
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -19,3 +19,5 @@ t/var/
*~
maint/.Generated_Pod
examples/Schema/db

lib/DBIx/Class/_TempExtlib
3 changes: 0 additions & 3 deletions lib/DBIx/Class/StartupCheck.pm
@@ -1,8 +1,5 @@
package DBIx::Class::StartupCheck;

use strict;
use warnings;

1;

__END__
Expand Down
2 changes: 2 additions & 0 deletions 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;

Expand Down
3 changes: 3 additions & 0 deletions maint/careless_ssh.bash
@@ -0,0 +1,3 @@
#!/bin/bash

/usr/bin/ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "$@"
1 change: 1 addition & 0 deletions maint/gen_pod_inherit
Expand Up @@ -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(
Expand Down
2 changes: 2 additions & 0 deletions t/00describe_environment.t
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion xt/dist/loadable_standalone_testschema_resultclasses.t
Expand Up @@ -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";
}

Expand Down
2 changes: 2 additions & 0 deletions xt/dist/pod_coverage.t
Expand Up @@ -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 },
Expand Down
1 change: 1 addition & 0 deletions xt/dist/postdistdir/pod_footers.t
Expand Up @@ -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;

Expand Down
4 changes: 4 additions & 0 deletions xt/dist/strictures.t
Expand Up @@ -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 = $_;
Expand Down
1 change: 1 addition & 0 deletions xt/extra/internals/namespaces_cleaned.t
Expand Up @@ -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($_));
Expand Down
3 changes: 3 additions & 0 deletions xt/extra/internals/optional_deps.t
Expand Up @@ -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};

Expand Down

0 comments on commit 399b945

Please sign in to comment.