* Fixes
- Fix $rs->create() with no values on Oracle
+ * Misc
+ - Speed up skipping CDBICompat tests when dependencies are missing
+
0.082800 2014-09-25 14:45 (UTC)
* Known Issues
- Passing large amounts of objects with stringification overload
use warnings;
use base qw/DBIx::Class::Core DBIx::Class::DB/;
-# Modules CDBICompat needs that DBIx::Class does not.
-my @Extra_Modules = qw(
- Class::Trigger
- DBIx::ContextualFetch
- Clone
-);
-
-my @didnt_load;
-for my $module (@Extra_Modules) {
- push @didnt_load, $module unless eval qq{require $module};
+unless (DBIx::Class::Optional::Dependencies->req_ok_for('cdbicompat')) {
+ __PACKAGE__->throw_exception(Class::Optional::Dependencies->req_missing_for('cdbicompat') . ' are missing and are required for CDBICompat');
}
-__PACKAGE__->throw_exception("@{[ join ', ', @didnt_load ]} are missing and are required for CDBICompat")
- if @didnt_load;
-
__PACKAGE__->load_own_components(qw/
Constraints
test_cdbicompat => {
req => {
- 'Class::DBI::Plugin::DeepAbstractSearch' => '0',
%$datetime_basic,
'Time::Piece::MySQL' => '0',
'Date::Simple' => '3.03',
},
},
+ test_cdbicompat_deepabstractsearch => {
+ req => {
+ 'Class::DBI::Plugin::DeepAbstractSearch' => '0',
+ },
+ },
+
+ cdbicompat => {
+ req => {
+ 'Class::Trigger' => '0',
+ 'DBIx::ContextualFetch' => '0',
+ 'Clone' => '0',
+ },
+ },
+
+ cdbicompat => {
+ req => {
+ 'Class::Trigger' => '0',
+ 'DBIx::ContextualFetch' => '0',
+ 'Clone' => '0',
+ },
+ },
+
# this is just for completeness as SQLite
# is a core dep of DBIC for testing
rdbms_sqlite => {
use Test::More;
+BEGIN {
+ eval { require Class::DBI::Column }
+ or plan skip_all => 'Class::DBI::Column required for this test';
+}
+
use lib 't/cdbi/testlib';
use ColumnObject;
# change too much
BEGIN { $ENV{DBIC_SHUFFLE_UNORDERED_RESULTSETS} = 0 }
-use lib 't/lib';
-use DBICTest;
-
BEGIN {
- eval { require DBIx::Class::CDBICompat }
- or plan skip_all => 'Class::DBI required for this test';
+ require DBIx::Class::Optional::Dependencies;
+ DBIx::Class::Optional::Dependencies->req_ok_for($_)
+ or plan skip_all => DBIx::Class::Optional::Dependencies->req_missing_for($_) . ' required for this test'
+ for qw(cdbicompat test_cdbicompat);
}
+use lib 't/lib';
+use DBICTest;
+
use base qw/DBIx::Class/;
__PACKAGE__->load_components(qw/CDBICompat Core DB/);