[Bps-public-commit] r16444 - in sd/branches/sd-dispatcher: .

sartak at bestpractical.com sartak at bestpractical.com
Tue Oct 21 14:03:14 EDT 2008


Author: sartak
Date: Tue Oct 21 14:03:14 2008
New Revision: 16444

Modified:
   sd/branches/sd-dispatcher/   (props changed)
   sd/branches/sd-dispatcher/lib/App/SD/CLI/Dispatcher.pm

Log:
 r74305 at onn:  sartak | 2008-10-21 14:03:08 -0400
 _try_to_load_cmd_class is gone, steal its relevant code


Modified: sd/branches/sd-dispatcher/lib/App/SD/CLI/Dispatcher.pm
==============================================================================
--- sd/branches/sd-dispatcher/lib/App/SD/CLI/Dispatcher.pm	(original)
+++ sd/branches/sd-dispatcher/lib/App/SD/CLI/Dispatcher.pm	Tue Oct 21 14:03:14 2008
@@ -51,9 +51,13 @@
     }
 
     for my $class (@possible_classes) {
-        if ($cli->_try_to_load_cmd_class($class)) {
-            return $class->run;
+        next unless Prophet::App->try_to_require($class);
+        if (!$class->isa('App::SD::CLI::Command')) {
+            warn "$class is not a subclass of App::SD::CLI::Command!";
+            next;
         }
+
+        return $class->run;
     }
 
     # found no class-based rule



More information about the Bps-public-commit mailing list