=head2 $self->path_prefix($c)
-Returns the default path prefix for :PathPrefix, :Local, :LocalRegex and
+Returns the default path prefix for :PathPrefix, :Local and
relative :Path actions in this component. Defaults to the action_namespace or
can be overridden from the "path" config key.
=head2 Regexp
-Status: Deprecated. Use Chained methods or other techniques
+Status: Deprecated. Use Chained methods or other techniques.
+If you really depend on this, install the standalone
+L<Catalyst::DispatchType::Regex> distribution.
A global way to match a give regular expression in the incoming request path.
=head2 LocalRegexp
+Status: Deprecated. Use Chained methods or other techniques.
+If you really depend on this, install the standalone
+L<Catalyst::DispatchType::Regex> distribution.
+
Like L</Regex> but scoped under the namespace of the containing controller
=head2 Chained
# FIXME - Some error checking and re-throwing needed here, as
# we eat exceptions loading dispatch types.
eval { Class::MOP::load_class($class) };
- push( @{ $self->dispatch_types }, $class->new ) unless $@;
+ if( $@ ){
+ warn( "Attempt to use deprecated $key dispatch type.\n"
+ . " Use Chained methods instead or install\n"
+ . " Catalyst::DispatchType::Regex if necessary.\n")
+ if $key =~ /^(Local)?Regex$/;
+ } else {
+ push( @{ $self->dispatch_types }, $class->new );
+ }
$registered->{$class} = 1;
}
}