case_sensitive removed basic-app-ctx-separation
Zbigniew Łukasiak [Tue, 10 Nov 2009 19:57:20 +0000 (19:57 +0000)]
lib/Catalyst.pm
lib/Catalyst/Context.pm
lib/Catalyst/Controller.pm
lib/Catalyst/Dispatcher.pm
lib/Catalyst/Utils.pm

index 2f6e458..5b27207 100644 (file)
@@ -1636,10 +1636,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 *
@@ -1709,13 +1705,8 @@ action table, but you can make them visible with a config parameter.
 
 =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>.
+Catalyst is not case sensitive, so C<MyApp::C::FOO::Bar> is
+mapped to C</foo/bar>.
 
 =head1 ON-DEMAND PARSER
 
index ed7be8b..d93b16d 100644 (file)
@@ -43,7 +43,7 @@ has 'application' => (
         models 
         views 
         component 
-        around config
+        config
         log
         debug
         dispatcher
@@ -58,7 +58,6 @@ has 'application' => (
         prepare 
         engine_class
         setup_actions
-        case_sensitive
         search_extra
         root
         parse_on_demand
index 39ca9f7..8e73316 100644 (file)
@@ -138,29 +138,13 @@ around action_namespace => sub {
     my ( $self, $c ) = @_;
 
     my $class = ref($self) || $self;
-    my $appclass = ref($c) || $c;
     if( ref($self) ){
         return $self->$orig if $self->has_action_namespace;
     } else {
         return $class->config->{namespace} if exists $class->config->{namespace};
     }
 
-    my $case_s;
-    if( $c ){
-        $case_s = $c->config->{case_sensitive};
-    } else {
-        if ($self->isa('Catalyst')) {
-            $case_s = $class->config->{case_sensitive};
-        } else {
-            if (ref $self) {
-                $case_s = ref($self->_application)->config->{case_sensitive};
-            } else {
-                confess("Can't figure out case_sensitive setting");
-            }
-        }
-    }
-
-    my $namespace = Catalyst::Utils::class2prefix($self->catalyst_component_name, $case_s) || '';
+    my $namespace = Catalyst::Utils::class2prefix($self->catalyst_component_name) || '';
     $self->$orig($namespace) if ref($self);
     return $namespace;
 };
index e1fd0c8..bd84361 100644 (file)
@@ -320,7 +320,7 @@ sub _invoke_as_component {
                     reverse   => "$component_or_class->$method",
                     class     => $component_or_class,
                     namespace => Catalyst::Utils::class2prefix(
-                        $component_or_class, $c->config->{case_sensitive}
+                        $component_or_class,
                     ),
                 }
             );
@@ -340,7 +340,7 @@ sub _invoke_as_component {
                 reverse   => "$component_class->$method",
                 class     => $component_class,
                 namespace => Catalyst::Utils::class2prefix(
-                    $component_class, $c->config->{case_sensitive}
+                    $component_class,
                 ),
             }
         );
index cc3f326..9362a92 100644 (file)
@@ -100,9 +100,9 @@ sub class2env {
     return uc($class);
 }
 
-=head2 class2prefix( $class, $case );
+=head2 class2prefix( $class );
 
-Returns the uri prefix for a class. If case is false the prefix is converted to lowercase.
+Returns the uri prefix for a class. The prefix is converted to lowercase.
 
     My::App::Controller::Foo::Bar becomes foo/bar
 
@@ -110,10 +110,9 @@ Returns the uri prefix for a class. If case is false the prefix is converted to
 
 sub class2prefix {
     my $class = shift || '';
-    my $case  = shift || 0;
     my $prefix;
     if ( $class =~ /^.+?::([MVC]|Model|View|Controller)::(.+)$/ ) {
-        $prefix = $case ? $2 : lc $2;
+        $prefix = lc $2;
         $prefix =~ s{::}{/}g;
     }
     return $prefix;