Warn on case_sensitive being set, remove documentation
Tomas Doran [Tue, 10 Nov 2009 19:56:09 +0000 (19:56 +0000)]
Changes
lib/Catalyst.pm

diff --git a/Changes b/Changes
index 29a43f5..50f4d43 100644 (file)
--- a/Changes
+++ b/Changes
@@ -11,6 +11,9 @@
     - Catalyst::Test::local_request sets ->request on the response.
     - Require HTTP::Request 5.814 and HTTP::Response 5.813 from LWP 5.814
       to avoid test fails.
+    - Log flush moved to the end of setup so that roles and plugins which
+      hook setup_finalize can log things and have them appear in application
+      startup, rather than with the first hit.
 
   Documentation:
     - Document no-args call to $c->uri_for.
     - Enable Catalyst::Utils::home() to find home within Dist::Zilla built
       distributions
 
+  Refactoring / cleanups:
+    - Remove documentation for the case_sensitive setting
+    - Warning is now emitted at application startup if the case_sensitive
+      setting is turned on. This setting is not used by anyone, not
+      believed to be useful and adds unnecessary complexity to controllers
+      and the dispatcher. If you are using this setting and have good reasons
+      why it should stay then you need to be shouting, now.
+
 5.80013 2009-09-17 11:07:04
 
    Bug fixes:
index 7cd470c..46a2457 100644 (file)
@@ -1145,7 +1145,6 @@ EOF
         my $name = $class->config->{name} || 'Application';
         $class->log->info("$name powered by Catalyst $Catalyst::VERSION");
     }
-    $class->log->_flush() if $class->log->can('_flush');
 
     # Make sure that the application class becomes immutable at this point,
     B::Hooks::EndOfScope::on_scope_end {
@@ -1170,7 +1169,15 @@ EOF
         ) unless $meta->is_immutable;
     };
 
+    if ($class->config->{case_sensitive}) {
+        $class->log->warn($class . "->config->{case_sensitive} is set.");
+        $class->log->warn("This setting is deprecated and planned to be removed in Catalyst 5.81.");
+    }
+
     $class->setup_finalize;
+    # Should be the last thing we do so that user things hooking
+    # setup_finalize can log..
+    $class->log->_flush() if $class->log->can('_flush');
 }
 
 
@@ -2676,10 +2683,6 @@ There are a number of 'base' config variables which can be set:
 
 =item *
 
-C<case_sensitive> - Makes private paths case sensitive. See L</CASE SENSITIVITY>.
-
-=item *
-
 C<default_model> - The default model picked if you say C<< $c->model >>. See L</$c->model($name)>.
 
 =item *
@@ -2747,16 +2750,6 @@ action table, but you can make them visible with a config parameter.
 
     MyApp->config(show_internal_actions => 1);
 
-=head1 CASE SENSITIVITY
-
-By default Catalyst is not case sensitive, so C<MyApp::C::FOO::Bar> is
-mapped to C</foo/bar>. You can activate case sensitivity with a config
-parameter.
-
-    MyApp->config(case_sensitive => 1);
-
-This causes C<MyApp::C::Foo::Bar> to map to C</Foo/Bar>.
-
 =head1 ON-DEMAND PARSER
 
 The request body is usually parsed at the beginning of a request,