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->uri_for_action( $action, \@captures )
51 abstract method, to be implemented by dispatchtypes. Takes a
52 L<Catalyst::Action> object and an arrayref of captures, and should
53 return either a URI part which if placed in $c->req->path would cause
54 $self->match to match this action and set $c->req->captures to the supplied
55 arrayref, or undef if unable to do so.
59 sub uri_for_action { }
64 Sebastian Riedel, C<sri@cpan.org>
68 This program is free software, you can redistribute it and/or modify it under
69 the same terms as Perl itself.