DBICTest::Schema::CD->load_components(qw/CDBICompat CDBICompat::Pager/);
-my $schema = DBICTest->init_schema();
+my $schema = DBICTest->init_schema(compose_connection => 1);
-#DBICTest::CD->result_source_instance->schema->storage($schema->storage);
+DBICTest::CD->result_source_instance->schema->storage($schema->storage);
my ( $pager, $it ) = DBICTest::CD->page(
{},
my $dbuser = $ENV{"DBICTEST_DBUSER"} || '';
my $dbpass = $ENV{"DBICTEST_DBPASS"} || '';
- my $schema = DBICTest::Schema->compose_namespace('DBICTest')
+ my $compose_method = ($args{compose_connection}
+ ? 'compose_connection'
+ : 'compose_namespace');
+
+ my $schema = DBICTest::Schema->$compose_method('DBICTest')
->connect($dsn, $dbuser, $dbpass);
$schema->storage->on_connect_do(['PRAGMA synchronous = OFF']);
if ( !$args{no_deploy} ) {