[Bps-public-commit] Prophet branch, master, updated. 2ef0d5a75ab66f0b324c9a0b64ea91091dacd0f9

sartak at bestpractical.com sartak at bestpractical.com
Fri Apr 10 15:00:03 EDT 2009


The branch, master has been updated
       via  2ef0d5a75ab66f0b324c9a0b64ea91091dacd0f9 (commit)
      from  e3178fa380b2fab7e10ae12acdd7f9ac7c9932d0 (commit)

Summary of changes:
 lib/Prophet/CLI/Dispatcher.pm |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit 2ef0d5a75ab66f0b324c9a0b64ea91091dacd0f9
Author: Shawn M Moore <sartak at gmail.com>
Date:   Fri Apr 10 14:58:40 2009 -0400

    Throw an error when no class is found instead of silently doing nothing

diff --git a/lib/Prophet/CLI/Dispatcher.pm b/lib/Prophet/CLI/Dispatcher.pm
index ef6d1bc..99d61d5 100644
--- a/lib/Prophet/CLI/Dispatcher.pm
+++ b/lib/Prophet/CLI/Dispatcher.pm
@@ -96,8 +96,10 @@ sub run_command {
         for my $class (@classes) {
             Prophet::App->try_to_require($class) or next;
             $class->new(%constructor_args)->run;
-            last;
+            return;
         }
+
+        die "Invalid command command class suffix '$name'";
     };
 }
 

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list