restore prevoius revision for Base.pm
[catagits/Catalyst-Runtime.git] / lib / Catalyst.pm
index 55057e3..61439c2 100644 (file)
@@ -125,14 +125,19 @@ Returns a hashref containing your applications settings.
 
 sub import {
     my ( $class, @arguments ) = @_;
+    
     my $caller = caller(0);
+    
+    if ( $caller eq 'main' ) {
+        return;
+    }
 
     # Prepare inheritance
     unless ( $caller->isa($class) ) {
         no strict 'refs';
         push @{"$caller\::ISA"}, $class;
     }
-
+    
     if ( $caller->engine ) {
         $caller->log->warn( qq/Attempt to re-initialize "$caller"/ );
         return;
@@ -144,7 +149,7 @@ sub import {
     foreach (@arguments) {
 
         if ( /^-Debug$/ ) {
-            $flags->{log} = 1
+            $flags->{log} = ( $flags->{log} ) ? 'debug,' . $flags->{log} : 'debug';
         }
         elsif (/^-(\w+)=?(.*)$/) {
             $flags->{ lc $1 } = $2;