use Test::More;
use Test::Warn;
use Test::Exception;
-use DBIx::Class::Carp;
use lib 't/lib';
use DBICTest;
+use DBIx::Class::Carp;
{
sub DBICTest::DBICCarp::frobnicate {
# and do full populate() as well, just in case - shouldn't add new stuff
{
local $ENV{DBICTEST_SQLITE_REVERSE_DEFAULT_ORDER};
- require DBICTest;
+ {
+ # in general we do not want DBICTest to load before sqla, but it is
+ # ok to cheat here
+ local $INC{'SQL/Abstract.pm'};
+ require DBICTest;
+ }
my $s = DBICTest->init_schema;
is ($s->resultset('Artist')->find(1)->name, 'Caterwauler McCrae');
assert_no_missing_expected_requires();
use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
use DBICTest::RunMode;
-use DBIC::SqlMakerTest;
-
-use DBIx::Class::SQLMaker::LimitDialects;
-my $ROWS = DBIx::Class::SQLMaker::LimitDialects->__rows_bindtype,
-my $TOTAL = DBIx::Class::SQLMaker::LimitDialects->__total_bindtype,
$ENV{NLS_SORT} = "BINARY";
$ENV{NLS_COMP} = "BINARY";
use DBICTest;
use DBICTest::Schema;
+use DBIC::SqlMakerTest;
+
+use DBIx::Class::SQLMaker::LimitDialects;
+my $ROWS = DBIx::Class::SQLMaker::LimitDialects->__rows_bindtype,
+my $TOTAL = DBIx::Class::SQLMaker::LimitDialects->__total_bindtype,
my $schema = DBICTest::Schema->connect($dsn, $user, $pass);
use Test::More;
use Test::Exception;
use Try::Tiny;
-use DBIx::Class::SQLMaker::LimitDialects;
+
use DBIx::Class::Optional::Dependencies ();
+plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_mssql_odbc')
+ unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_mssql_odbc');
+
use lib qw(t/lib);
use DBICTest;
use DBIC::SqlMakerTest;
-
-plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_mssql_odbc')
- unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_mssql_odbc');
+use DBIx::Class::SQLMaker::LimitDialects;
my $OFFSET = DBIx::Class::SQLMaker::LimitDialects->__offset_bindtype;
my $TOTAL = DBIx::Class::SQLMaker::LimitDialects->__total_bindtype;
}
}
+use Module::Runtime 'module_notional_filename';
+BEGIN {
+ for my $mod (qw( DBIC::SqlMakerTest SQL::Abstract )) {
+ if ( $INC{ module_notional_filename($mod) } ) {
+ # FIXME this does not seem to work in BEGIN - why?!
+ #require Carp;
+ #$Carp::Internal{ (__PACKAGE__) }++;
+ #Carp::croak( __PACKAGE__ . " must be loaded before $mod" );
+
+ my ($fr, @frame) = 1;
+ while (@frame = caller($fr++)) {
+ last if $frame[1] !~ m|^t/lib/DBICTest|;
+ }
+
+ die __PACKAGE__ . " must be loaded before $mod (or modules using $mod) at $frame[1] line $frame[2]\n";
+ }
+ }
+}
+
use DBICTest::RunMode;
use DBICTest::Schema;
use DBICTest::Util::LeakTracer qw/populate_weakregistry assert_empty_weakregistry/;
use Test::More;
use lib qw(t/lib);
-use DBIC::SqlMakerTest;
use DBICTest;
+use DBIC::SqlMakerTest;
my $schema = DBICTest->init_schema();
use Test::More;
use lib qw(t/lib);
-use DBIC::SqlMakerTest;
use DBICTest;
+use DBIC::SqlMakerTest;
my $schema = DBICTest->init_schema();
use Test::More;
use lib qw(t/lib);
-use DBIC::SqlMakerTest;
use DBICTest;
+use DBIC::SqlMakerTest;
use DBIx::Class::SQLMaker::LimitDialects;
my ($ROWS, $OFFSET) = (
use Test::More;
use lib qw(t/lib);
+use DBICTest;
use DBIC::SqlMakerTest;
-use_ok('DBICTest');
-
my $schema = DBICTest->init_schema;
my $where_bind = {
use Test::More;
use lib qw(t/lib);
-use DBIC::SqlMakerTest;
use DBICTest;
+use DBIC::SqlMakerTest;
my $schema = DBICTest->init_schema();
use Test::More;
use lib qw(t/lib);
-use DBIC::SqlMakerTest;
use DBICTest;
+use DBIC::SqlMakerTest;
my $schema = DBICTest->init_schema();
use Test::More;
use lib qw(t/lib);
-use DBIC::SqlMakerTest;
use DBICTest;
+use DBIC::SqlMakerTest;
use DBIx::Class::SQLMaker::LimitDialects;
my $ROWS = DBIx::Class::SQLMaker::LimitDialects->__rows_bindtype;
use Test::More;
use lib qw(t/lib);
-use DBIC::SqlMakerTest;
use DBICTest;
-
+use DBIC::SqlMakerTest;
my $schema = DBICTest->init_schema();
use Test::Exception;
use lib qw(t/lib);
-use DBIC::SqlMakerTest;
use DBICTest;
-
+use DBIC::SqlMakerTest;
my $schema = DBICTest->init_schema();
use Test::Exception;
use lib qw(t/lib);
+use DBICTest;
use DBIC::SqlMakerTest;
-use_ok('DBICTest');
-
my $schema = DBICTest->init_schema(no_deploy => 1);
my $sql_maker = $schema->storage->sql_maker;
use Test::More;
use lib qw(t/lib);
+use DBICTest;
use DBIC::SqlMakerTest;
-use_ok('DBICTest');
-
my $schema = DBICTest->init_schema();
my $sql_maker = $schema->storage->sql_maker;
use Test::Warn;
use lib qw(t/lib);
+use DBICTest;
use DBIC::SqlMakerTest;
-use_ok('DBICTest');
-
my $schema = DBICTest->init_schema();
my $sql_maker = $schema->storage->sql_maker;
use Test::More;
use lib qw(t/lib);
+use DBICTest;
use DBIC::SqlMakerTest;
+use DBIC::DebugObj;
-
-use_ok('DBICTest');
-use_ok('DBIC::DebugObj');
my $schema = DBICTest->init_schema();
$schema->storage->sql_maker->quote_char('`');
use Test::More;
use lib qw(t/lib);
+use DBICTest;
use DBIC::SqlMakerTest;
-
-use_ok('DBICTest');
-use_ok('DBIC::DebugObj');
+use DBIC::DebugObj;
my $schema = DBICTest->init_schema();