Disallow writing to config after setup.
Florian Ragwitz [Fri, 30 Jan 2009 18:34:32 +0000 (18:34 +0000)]
lib/Catalyst.pm

index f3df124..7665829 100644 (file)
@@ -805,8 +805,8 @@ around config => sub {
     my $orig = shift;
     my $c = shift;
 
-    $c->log->warn("Setting config after setup has been run is not a good idea.")
-      if ( @_ and $c->setup_finished );
+    croak('Setting config after setup has been run is not allowed.')
+        if ( @_ and $c->setup_finished );
 
     $c->$orig(@_);
 };