*~
maint/.Generated_Pod
examples/Schema/db
-
-lib/DBIx/Class/Bundled
+lib/DBIx/Class/_TempExtlib
\ No newline at end of file
## TEMPORARY (and non-portable)
## Get the dq stuff
##
-if ($Module::Install::AUTHOR) {
- `rm -rf lib/DBIx/Class/Bundled`;
- `mkdir lib/DBIx/Class/Bundled`;
- for (
- [ 'Data-Query' => 'master' ],
- [ 'SQL-Abstract' => 'dq' ],
- ) {
- my $tdir = '/tmp/dqlib_tmp_clone';
-
- `rm -rf $tdir`;
-
- `GIT_SSH=maint/careless_ssh.bash git clone --quiet git://git.shadowcat.co.uk/dbsrgits/$_->[0] $tdir`;
- printf "\nIncluding %s git rev %s\n",
- $_->[0],
- scalar `GIT_DIR=$tdir/.git git rev-parse origin/$_->[1]`,
- ;
- `git archive --format=tar --remote=file://$tdir origin/$_->[1] lib/ | tar --strip-components=1 -xC lib/DBIx/Class/Bundled`;
-
- `rm -rf $tdir`;
+my $target_libdir;
+BEGIN {
+ $target_libdir = 'lib/DBIx/Class/_TempExtlib';
+
+ if ($Module::Install::AUTHOR) {
+
+ `rm -rf $target_libdir`;
+ `mkdir $target_libdir`;
+ for (
+ [ 'Data-Query' => 'master' ],
+ [ 'SQL-Abstract' => 'dq' ],
+ ) {
+ my $tdir = "/tmp/dqlib/$_->[0]/_tmp_clone";
+
+ `rm -rf $tdir`;
+
+ `GIT_SSH=maint/careless_ssh.bash git clone --quiet git://git.shadowcat.co.uk/dbsrgits/$_->[0] $tdir`;
+ printf "\nIncluding %s git rev %s\n",
+ $_->[0],
+ scalar `GIT_DIR=$tdir/.git git rev-parse origin/$_->[1]`,
+ ;
+ `git archive --format=tar --remote=file://$tdir origin/$_->[1] lib/ | tar --strip-components=1 -xC $target_libdir`;
+
+ `rm -rf $tdir`;
+ }
}
- `cpanm SQL::ReservedWords 2>&1`;
}
-use lib 'lib/DBIx/Class/Bundled';
+use lib $target_libdir;
##
## DO NOT USE THIS HACK IN YOUR DISTS!!! (it makes #toolchain sad)
use strict;
use warnings;
-use DBIx::Class::Bundled;
+use DBIx::Class::_TempExtlib;
our $VERSION;
# Always remember to do all digits for the version even if they're 0
+++ /dev/null
-package DBIx::Class::Bundled;
-
-use strict;
-use warnings;
-use File::Spec;
-
-our $HERE = File::Spec->catdir(
- File::Spec->rel2abs(
- join '', (File::Spec->splitpath(__FILE__))[0,1]
- ),
- 'Bundled'
- );
-
-($HERE) = ($HERE =~ /^(.*)$/); # screw you, taint mode
-
-unshift @INC, $HERE;
-
-1;
--- /dev/null
+package # hide from the pauses
+ DBIx::Class::_TempExtlib;
+
+use strict;
+use warnings;
+use File::Spec;
+use Module::Runtime;
+
+# There can be only one of these, make sure we get the bundled part and
+# *not* something off the site lib
+for (qw(
+ DBIx::Class::SQLMaker
+ SQL::Abstract
+ SQL::Abstract::Test
+)) {
+ if ($INC{Module::Runtime::module_notional_filename($_)}) {
+ die "\nUnable to continue - a part of the bundled templib contents "
+ . "was already loaded (likely an older version from CPAN). "
+ . "Make sure that @{[ __PACKAGE__ ]} is loaded before $_\n\n"
+ ;
+ }
+}
+
+our ($HERE) = File::Spec->rel2abs(
+ File::Spec->catdir( (File::Spec->splitpath(__FILE__))[1], '_TempExtlib' )
+) =~ /^(.*)$/; # screw you, taint mode
+
+unshift @INC, $HERE;
+
+1;
lib/DBIx/Class/Admin
lib/DBIx/Class/PK/Auto
lib/DBIx/Class/CDBICompat
- lib/DBIx/Class/Bundled
+ lib/DBIx/Class/_TempExtlib
maint
|);
no_index package => $_ for (qw/
DBIx::Class::Storage::BlockRunner
DBIx::Class::Carp
DBIx::Class::_Util
+ DBIx::Class::_TempExtlib
DBIx::Class::ResultSet::Pager
/);
(); # empty RV for @modules
};
-} grep !/Bundled::/, find_modules();
+} grep { $_ !~ /_TempExtlib/ } find_modules();
# have an exception table for old and/or weird code we are not sure
# we *want* to clean in the first place
use strict;
use warnings;
+# Needs to load 1st so that the correct SQLA::Test is picked up
+use DBIx::Class::_TempExtlib;
+
# this noop trick initializes the STDOUT, so that the TAP::Harness
# issued IO::Select->can_read calls (which are blocking wtf wtf wtf)
# keep spinning and scheduling jobs