1 package Catalyst::DispatchType;
4 use base 'Class::Accessor::Fast';
8 Catalyst::DispatchType - DispatchType Base Class
16 This is an abstract base class for Dispatch Types.
20 =head2 $self->list($c)
22 abstract method, to be implemented by dispatchtypes. Called to display
29 =head2 $self->match( $c, $path )
31 abstract method, to be implemented by dispatchtypes. Returns true if the
32 dispatch type matches the given path
36 sub match { die "Abstract method!" }
38 =head2 $self->register( $c, $action )
40 abstract method, to be implemented by dispatchtypes. Takes a
41 context object and a L<Catalyst::Action> object.
43 Should return true if it registers something, or false otherwise.
49 =head2 $self->expand_action
51 Default fallback, returns nothing. See L<Catalyst::Dispatcher> for more info
58 =head2 $self->uri_for_action( $action, \@captures )
60 abstract method, to be implemented by dispatchtypes. Takes a
61 L<Catalyst::Action> object and an arrayref of captures, and should
62 return either a URI part which if placed in $c->req->path would cause
63 $self->match to match this action and set $c->req->captures to the supplied
64 arrayref, or undef if unable to do so.
68 sub uri_for_action { }
72 Catalyst Contributors, see Catalyst.pm
76 This program is free software, you can redistribute it and/or modify it under
77 the same terms as Perl itself.