Merge branch 'current/for_cpan_index' into current/dq
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / _TempExtlib.pm
1 package # hide from the pauses
2   DBIx::Class::_TempExtlib;
3
4 use strict;
5 use warnings;
6 use File::Spec;
7 use Module::Runtime;
8
9 # There can be only one of these, make sure we get the bundled part and
10 # *not* something off the site lib
11 for (qw(
12   DBIx::Class::SQLMaker
13   SQL::Abstract
14   SQL::Abstract::Test
15 )) {
16   if ($INC{Module::Runtime::module_notional_filename($_)}) {
17     die "\nUnable to continue - a part of the bundled templib contents "
18       . "was already loaded (likely an older version from CPAN). "
19       . "Make sure that @{[ __PACKAGE__ ]} is loaded before $_\n\n"
20     ;
21   }
22 }
23
24 our ($HERE) = File::Spec->rel2abs(
25   File::Spec->catdir( (File::Spec->splitpath(__FILE__))[1], '_TempExtlib' )
26 ) =~ /^(.*)$/; # screw you, taint mode
27
28 unshift @INC, $HERE;
29
30 1;