Not sure what I was thinking, but 18637ebb never worked :/
[dbsrgits/DBIx-Class.git] / script / dbicadmin
index 13c724d..bdd618c 100755 (executable)
@@ -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;
@@ -41,7 +40,7 @@ my ($opts, $usage) = describe_options(
       ['insert'   => 'Insert data into the schema'],
       ['update'   => 'Update data in the schema'],
       ['delete'   => 'Delete data from the schema'],
-      ['op:s' => 'compatiblity option all of the above can be suppied as --op=<action>'],
+      ['op:s' => 'compatibility option all of the above can be supplied as --op=<action>'],
       ['help' => 'display this help', { implies => { schema_class => '__dummy__' } } ],
       ['documentation-as-pod:s' => 'hidden', { implies => { schema_class => '__dummy__' } } ],
     ], required => 1 }],
@@ -100,7 +99,7 @@ if($opts->{help}) {
   $usage->die();
 }
 
-# option compatability mangle
+# option compatibility mangle
 # (can not be joined in the spec, one is s% the other is s)
 if($opts->{connect}) {
   $opts->{connect_info} = delete $opts->{connect};