[Catalyst-commits] r11854 - in
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/lib:
. Catalyst
zby at dev.catalyst.perl.org
zby at dev.catalyst.perl.org
Mon Nov 16 20:32:41 GMT 2009
Author: zby
Date: 2009-11-16 20:32:40 +0000 (Mon, 16 Nov 2009)
New Revision: 11854
Modified:
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/lib/Catalyst.pm
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/lib/Catalyst/Controller.pm
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/lib/Catalyst/Dispatcher.pm
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/lib/Catalyst/Utils.pm
Log:
case_sensitive config setting removed
Modified: Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/lib/Catalyst/Controller.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/lib/Catalyst/Controller.pm 2009-11-16 20:00:24 UTC (rev 11853)
+++ Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/lib/Catalyst/Controller.pm 2009-11-16 20:32:40 UTC (rev 11854)
@@ -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 = $appclass->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-cleaned/lib/Catalyst/Dispatcher.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/lib/Catalyst/Dispatcher.pm 2009-11-16 20:00:24 UTC (rev 11853)
+++ Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/lib/Catalyst/Dispatcher.pm 2009-11-16 20:32:40 UTC (rev 11854)
@@ -334,9 +334,7 @@
code => $code,
reverse => "$component_class->$method",
class => $component_class,
- namespace => Catalyst::Utils::class2prefix(
- $component_class, ref($c)->config->{case_sensitive}
- ),
+ namespace => Catalyst::Utils::class2prefix( $component_class ),
}
);
}
Modified: Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/lib/Catalyst/Utils.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/lib/Catalyst/Utils.pm 2009-11-16 20:00:24 UTC (rev 11853)
+++ Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/lib/Catalyst/Utils.pm 2009-11-16 20:32:40 UTC (rev 11854)
@@ -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-cleaned/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/lib/Catalyst.pm 2009-11-16 20:00:24 UTC (rev 11853)
+++ Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/lib/Catalyst.pm 2009-11-16 20:32:40 UTC (rev 11854)
@@ -1169,11 +1169,6 @@
) 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..
More information about the Catalyst-commits
mailing list