if ($ENV{DBICTEST_SQLT_DEPLOY}) {
local @INC = ('lib', @INC);
require DBIx::Class::Optional::Dependencies;
- my $dep_req = DBIx::Class::Optional::Dependencies->req_list_for('deploy');
- for (keys %$dep_req) {
- test_requires ($_ => $dep_req->{$_})
+ my $deploy_req = DBIx::Class::Optional::Dependencies->req_list_for('deploy');
+ for (keys %$deploy_req) {
+ test_requires ($_ => $deploy_req->{$_})
}
}
use warnings;
BEGIN {
- use DBIx::Class;
- die ( 'The following modules are required for the dbicadmin utility: '
- . DBIx::Class::Optional::Dependencies->req_missing_for ('admin_script')
- . "\n"
- ) unless DBIx::Class::Optional::Dependencies->req_ok_for ('admin_script');
+ require DBIx::Class::Optional::Dependencies;
+ if (my $missing = DBIx::Class::Optional::Dependencies->req_missing_for ('admin_script') ) {
+ die "The following modules are required for the dbicadmin utility: $missing\n";
+ }
}
use DBIx::Class::Admin::Descriptive;