use DBIx::Class::_Util;
use mro 'c3';
-use DBIx::Class::Optional::Dependencies;
-
use base qw/DBIx::Class::Componentised DBIx::Class::AccessorGroup/;
use DBIx::Class::StartupCheck;
use DBIx::Class::Exception;
return;
}
+ require DBIx::Class::Optional::Dependencies;
if ( my $missing = DBIx::Class::Optional::Dependencies->req_missing_for('deploy') ) {
$self->throw_exception("Unable to proceed without $missing");
}
if ($profile =~ /^\.?\//) {
+ require DBIx::Class::Optional::Dependencies;
if ( my $missing = DBIx::Class::Optional::Dependencies->req_missing_for ('config_file_reader') ) {
$self->throw_exception("Unable to parse TRACE_PROFILE config file '$profile' without $missing");
}
sub create_ddl_dir {
my ($self, $schema, $databases, $version, $dir, $preversion, $sqltargs) = @_;
+ require DBIx::Class::Optional::Dependencies;
+ if (my $missing = DBIx::Class::Optional::Dependencies->req_missing_for ('deploy')) {
+ $self->throw_exception("Can't create a ddl file without $missing");
+ }
+
if (!$dir) {
carp "No directory given, using ./\n";
$dir = './';
%{$sqltargs || {}}
};
- if (my $missing = DBIx::Class::Optional::Dependencies->req_missing_for ('deploy')) {
- $self->throw_exception("Can't create a ddl file without $missing");
- }
-
my $sqlt = SQL::Translator->new( $sqltargs );
$sqlt->parser('SQL::Translator::Parser::DBIx::Class');
return join('', @rows);
}
+ require DBIx::Class::Optional::Dependencies;
if (my $missing = DBIx::Class::Optional::Dependencies->req_missing_for ('deploy') ) {
$self->throw_exception("Can't deploy without a pregenerated 'ddl_dir' directory or $missing");
}
);
}
elsif (
+ require DBIx::Class::Optional::Dependencies
+ and
my $missing = DBIx::Class::Optional::Dependencies->req_missing_for([qw( rdbms_pg binary_data )])
) {
# FIXME - perhaps this needs to be an exception too...?
use DBICTest::Util::LeakTracer qw(populate_weakregistry assert_empty_weakregistry visit_refs);
use Scalar::Util qw(weaken blessed reftype);
use DBIx::Class::_Util qw(hrefaddr sigwarn_silencer modver_gt_or_eq modver_gt_or_eq_and_lt);
+use DBIx::Class::Optional::Dependencies;
my $TB = Test::More->builder;
if ($ENV{DBICTEST_IN_PERSISTENT_ENV}) {
);
SKIP: {
+ require DBIx::Class::Optional::Dependencies;
DBIx::Class::Optional::Dependencies->skip_without('test_memcached');
my $memcached = Cache::Memcached->new(
use Carp;
use Scalar::Util qw(isweak weaken blessed reftype);
use DBIx::Class::_Util qw(refcount hrefaddr refdesc);
-use DBIx::Class::Optional::Dependencies;
use DBICTest::RunMode;
use Data::Dumper::Concise;
use DBICTest::Util qw( stacktrace visit_namespaces );
use constant {
- CV_TRACING => !DBICTest::RunMode->is_plain && DBIx::Class::Optional::Dependencies->req_ok_for ('test_leaks_heavy'),
+ CV_TRACING => !!(
+ !DBICTest::RunMode->is_plain
+ &&
+ require DBIx::Class::Optional::Dependencies
+ &&
+ DBIx::Class::Optional::Dependencies->req_ok_for ('test_leaks_heavy')
+ ),
};
use base 'Exporter';
use Test::More;
use Test::Exception;
-
+use DBIx::Class::Optional::Dependencies;
use DBICTest;
my $schema = DBICTest->init_schema(cursor_class => 'DBICTest::Cursor');
use Test::More;
use Test::Exception;
+use DBIx::Class::Optional::Dependencies;
use DBIx::Class::_Util qw(modver_gt_or_eq sigwarn_silencer scope_guard);