Disallow calling setup more than once.
Florian Ragwitz [Sat, 31 Jan 2009 18:39:54 +0000 (18:39 +0000)]
lib/Catalyst.pm

index 7665829..b776dca 100644 (file)
@@ -923,8 +923,8 @@ Catalyst> line.
 
 sub setup {
     my ( $class, @arguments ) = @_;
-    $class->log->warn("Running setup twice is not a good idea.")
-      if ( $class->setup_finished );
+    croak('Running setup more than once')
+        if ( $class->setup_finished );
 
     unless ( $class->isa('Catalyst') ) {