From: Florian Ragwitz Date: Sat, 31 Jan 2009 18:39:54 +0000 (+0000) Subject: Disallow calling setup more than once. X-Git-Tag: 5.8000_06~21 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=c2f3cc1b82343d12e03bf72f888447a1486b0ee9 Disallow calling setup more than once. --- diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 7665829..b776dca 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -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') ) {