Added warning for setup after setup
Matt S Trout [Wed, 10 May 2006 18:58:26 +0000 (18:58 +0000)]
Changes
lib/Catalyst.pm

diff --git a/Changes b/Changes
index 90356d0..544b913 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,6 @@
 This file documents the revision history for Perl extension Catalyst.
 
+        - Added warning for setup being called twice
         - Fix pod to use DBIC::Schema instead of DBIC model
         - Fix ->config failing to copy _config for subclassing
         - ConfigLoader: Updated to version 0.07
index 961899e..755a9ab 100644 (file)
@@ -725,6 +725,9 @@ Catalyst> line.
 sub setup {
     my ( $class, @arguments ) = @_;
 
+    $class->log->warn("Running setup twice is not a good idea.")
+      if ( $class->setup_finished );
+
     unless ( $class->isa('Catalyst') ) {
 
         Catalyst::Exception->throw(