[Bps-public-commit] r14090 - in Prophet/trunk: .

sartak at bestpractical.com sartak at bestpractical.com
Mon Jul 14 17:05:04 EDT 2008


Author: sartak
Date: Mon Jul 14 17:04:48 2008
New Revision: 14090

Modified:
   Prophet/trunk/   (props changed)
   Prophet/trunk/lib/Prophet/CLI.pm

Log:
 r64235 at onn:  sartak | 2008-07-14 17:04:29 -0400
 Don't generate warnings on "./bin/sd", Class::MOP::is_class_loaded("Prophet::CLI::Command::") returns 1, which makes sense if you squint


Modified: Prophet/trunk/lib/Prophet/CLI.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/CLI.pm	(original)
+++ Prophet/trunk/lib/Prophet/CLI.pm	Mon Jul 14 17:04:48 2008
@@ -150,7 +150,8 @@
     return $class if $class->isa('Prophet::CLI::Command');
 
     warn "Invalid class $class - not a subclass of Prophet::CLI::Command."
-        if Class::MOP::is_class_loaded($class);
+        if $class !~ /::$/ # don't warn about "Prophet::CLI::Command::" (which happens on "./bin/sd")
+        && Class::MOP::is_class_loaded($class);
 
     return undef;
 }



More information about the Bps-public-commit mailing list