move the --config option to be global, also add a command to unsubscribe a
[p5sagit/Promulger.git] / lib / App / Promulger / Command.pm
index 32f6315..1c699c6 100644 (file)
@@ -6,15 +6,9 @@ use App::Cmd::Setup -command;
 
 use Promulger::Config;
 
-sub opt_spec {
-  return (
-    [ "config|c=s", "configuration file", { required => 1 } ],
-  );
-}
-
 sub validate_args {
   my ($self, $opt, $args) = @_;
-  my $cf = $opt->{config};
+  my $cf = $self->app->global_options->{config};
 
   unless(-e $cf) {
     die "Config file $cf doesn't exist\n";