X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FEngine.pm;h=05136150e0868bdede9d2e9fdf7c8de51deac8fe;hp=ec6c0f32b12ea4c45250d19b97eab6e73ce5cafd;hb=0434eec1ecc7509e95267850ae1b517d6504ed3f;hpb=03742cea7daff59ed41786a519d8ff7b0be75aad diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index ec6c0f3..0513615 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -809,9 +809,11 @@ sub _prefix { sub _class2prefix { my $class = shift || ''; - $class =~ /^.*::([MVC]|Model|View|Controller)?::(.*)$/; - my $prefix = lc $2 || ''; - $prefix =~ s/\:\:/\//g; + my $prefix; + if ($class =~ /^.*::([MVC]|Model|View|Controller)?::(.*)$/) { + $prefix = lc $2; + $prefix =~ s/\:\:/\//g; + } return $prefix; }