X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FUtils.pm;h=3fff3c6e9d140799414753f8d26a71fa03defc3e;hb=40a21eff7619a0c872ad88c6962cfd7474039b88;hp=53bf7957ac7dfb5c0cc4b995b57009a7a3c4579b;hpb=7d7519a4bbd079da53bf50f4822cabb0e3af74a1;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Utils.pm b/lib/Catalyst/Utils.pm index 53bf795..3fff3c6 100644 --- a/lib/Catalyst/Utils.pm +++ b/lib/Catalyst/Utils.pm @@ -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;