Skip to content

Commit

Permalink
Minor streamline of optdeps usage (no functional changes)
Browse files Browse the repository at this point in the history
  • Loading branch information
ribasushi committed Jan 25, 2015
1 parent 1c30a2e commit c9a26f7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ my $test_requires = {
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->{$_})
}
}

Expand Down
9 changes: 4 additions & 5 deletions script/dbicadmin
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ use strict;
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;
Expand Down

0 comments on commit c9a26f7

Please sign in to comment.