Catalyst::Dispatcher - The Catalyst Dispatcher
See Catalyst.
This is the class that maps public urls to actions in your Catalyst application based on the attributes you set.
Construct a new dispatcher.
An arrayref of pre-loaded dispatchtype classes
Entries are considered to be available as Catalyst::DispatchType::CLASS
To use a custom class outside the regular Catalyst
namespace, prefix it with a +
, like so:
+My::Dispatch::Type
An arrayref of post-loaded dispatchtype classes
Entries are considered to be available as Catalyst::DispatchType::CLASS
To use a custom class outside the regular Catalyst
namespace, prefix it with a +
, like so:
+My::Dispatch::Type
Delegate the dispatch to the action that matched the url, or return a message about unknown resource
Documented in Catalyst
Documented in Catalyst
Documented in Catalyst
Documented in Catalyst
Find an dispatch type that matches $c->req->path, and set args from it.
returns a named action from a given namespace. $action_name
may be a relative path on that $namespace
such as
$self->get_action('../bar', 'foo/baz');
In which case we look for the action at 'foo/bar'.
Returns the named action by its full private path.
This method performs some normalization on $path
so that if it includes '..' it will do the right thing (for example if $path
is '/foo/../bar' that is normalized to '/bar'.
Return all the action containers for a given namespace, inclusive
Takes a Catalyst::Action object and action parameters and returns a URI part such that if $c->req->path were this URI part, this action would be dispatched to with $c->req->captures set to the supplied arrayref.
If the action object is not available for external dispatch or the dispatcher cannot determine an appropriate URI, this method will return undef.
expand an action into a full representation of the dispatch. mostly useful for chained, other actions will just return a single action.
Make sure all required dispatch types for this action are loaded, then pass the action to our dispatch types so they can register it if required. Also, set up the tree with the action containers.
Loads all of the pre-load dispatch types, registers their actions and then loads all of the post-load dispatch types, and iterates over the tree of actions, displaying the debug information if appropriate.
Get the DispatchType object of the relevant type, i.e. passing $type
of Chained
would return a Catalyst::DispatchType::Chained object (assuming of course it's being used.)
Provided by Moose
Catalyst Contributors, see Catalyst.pm
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.