debug message fix for external class layers
Brandon Black [Sun, 19 Feb 2006 21:42:02 +0000 (21:42 +0000)]
lib/DBIx/Class/Schema/Loader/Generic.pm

index 9a4533f..52804fb 100644 (file)
@@ -402,9 +402,10 @@ sub _load_classes {
             croak "Failed to load external class definition"
                   . "for '$table_class': $@";
         }
-
-        warn qq/# Loaded external class definition for '$table_class'\n/
-            if $self->debug;
+        elsif(!$@) {
+            warn qq/# Loaded external class definition for '$table_class'\n/
+                if $self->debug;
+        }
 
         $schema->register_class($table_moniker, $table_class);
         $self->classes->{$lc_tblname} = $table_class;