[Catalyst-commits] r11791 - in
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation/lib:
. Catalyst
zby at dev.catalyst.perl.org
zby at dev.catalyst.perl.org
Tue Nov 10 19:57:21 GMT 2009
Author: zby
Date: 2009-11-10 19:57:20 +0000 (Tue, 10 Nov 2009)
New Revision: 11791
Modified:
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation/lib/Catalyst.pm
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation/lib/Catalyst/Context.pm
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation/lib/Catalyst/Controller.pm
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation/lib/Catalyst/Dispatcher.pm
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation/lib/Catalyst/Utils.pm
Log:
case_sensitive removed
Modified: Catalyst-Runtime/5.80/branches/basic-app-ctx-separation/lib/Catalyst/Context.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/basic-app-ctx-separation/lib/Catalyst/Context.pm 2009-11-10 19:56:09 UTC (rev 11790)
+++ Catalyst-Runtime/5.80/branches/basic-app-ctx-separation/lib/Catalyst/Context.pm 2009-11-10 19:57:20 UTC (rev 11791)
@@ -43,7 +43,7 @@
models
views
component
- around config
+ config
log
debug
dispatcher
@@ -58,7 +58,6 @@
prepare
engine_class
setup_actions
- case_sensitive
search_extra
root
parse_on_demand
Modified: Catalyst-Runtime/5.80/branches/basic-app-ctx-separation/lib/Catalyst/Controller.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/basic-app-ctx-separation/lib/Catalyst/Controller.pm 2009-11-10 19:56:09 UTC (rev 11790)
+++ Catalyst-Runtime/5.80/branches/basic-app-ctx-separation/lib/Catalyst/Controller.pm 2009-11-10 19:57:20 UTC (rev 11791)
@@ -138,29 +138,13 @@
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;
};
Modified: Catalyst-Runtime/5.80/branches/basic-app-ctx-separation/lib/Catalyst/Dispatcher.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/basic-app-ctx-separation/lib/Catalyst/Dispatcher.pm 2009-11-10 19:56:09 UTC (rev 11790)
+++ Catalyst-Runtime/5.80/branches/basic-app-ctx-separation/lib/Catalyst/Dispatcher.pm 2009-11-10 19:57:20 UTC (rev 11791)
@@ -320,7 +320,7 @@
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 @@
reverse => "$component_class->$method",
class => $component_class,
namespace => Catalyst::Utils::class2prefix(
- $component_class, $c->config->{case_sensitive}
+ $component_class,
),
}
);
Modified: Catalyst-Runtime/5.80/branches/basic-app-ctx-separation/lib/Catalyst/Utils.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/basic-app-ctx-separation/lib/Catalyst/Utils.pm 2009-11-10 19:56:09 UTC (rev 11790)
+++ Catalyst-Runtime/5.80/branches/basic-app-ctx-separation/lib/Catalyst/Utils.pm 2009-11-10 19:57:20 UTC (rev 11791)
@@ -100,9 +100,9 @@
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 @@
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;
Modified: Catalyst-Runtime/5.80/branches/basic-app-ctx-separation/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/basic-app-ctx-separation/lib/Catalyst.pm 2009-11-10 19:56:09 UTC (rev 11790)
+++ Catalyst-Runtime/5.80/branches/basic-app-ctx-separation/lib/Catalyst.pm 2009-11-10 19:57:20 UTC (rev 11791)
@@ -1636,10 +1636,6 @@
=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,14 +1705,9 @@
=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.
+Catalyst is not case sensitive, so C<MyApp::C::FOO::Bar> is
+mapped to C</foo/bar>.
- 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,
More information about the Catalyst-commits
mailing list