1 package Catalyst::DispatchType;
4 with 'MooseX::Emulate::Class::Accessor::Fast';
9 Catalyst::DispatchType - DispatchType Base Class
17 This is an abstract base class for Dispatch Types.
21 =head2 $self->list($c)
23 abstract method, to be implemented by dispatchtypes. Called to display
30 =head2 $self->match( $c, $path )
32 abstract method, to be implemented by dispatchtypes. Returns true if the
33 dispatch type matches the given path
37 sub match { die "Abstract method!" }
39 =head2 $self->register( $c, $action )
41 abstract method, to be implemented by dispatchtypes. Takes a
42 context object and a L<Catalyst::Action> object.
44 Should return true if it registers something, or false otherwise.
50 =head2 $self->uri_for_action( $action, \@captures )
52 abstract method, to be implemented by dispatchtypes. Takes a
53 L<Catalyst::Action> object and an arrayref of captures, and should
54 return either a URI part which if placed in $c->req->path would cause
55 $self->match to match this action and set $c->req->captures to the supplied
56 arrayref, or undef if unable to do so.
60 sub uri_for_action { }
62 =head2 $self->expand_action
64 Default fallback, returns nothing. See L<Catalyst::Dispatcher> for more info
73 Catalyst Contributors, see Catalyst.pm
77 This program is free software, you can redistribute it and/or modify it under
78 the same terms as Perl itself.
82 __PACKAGE__->meta->make_immutable;