1 package Catalyst::DispatchType;
7 Catalyst::DispatchType - DispatchType Base Class
15 This is an abstract base class for Dispatch Types.
19 =head2 $self->list($c)
21 abstract method, to be implemented by dispatchtypes. Called to display
28 =head2 $self->match( $c, $path )
30 abstract method, to be implemented by dispatchtypes. Returns true if the
31 dispatch type matches the given path
35 sub match { die "Abstract method!" }
37 =head2 $self->register( $c, $action )
39 abstract method, to be implemented by dispatchtypes. Takes a
40 context object and a L<Catalyst::Action> object.
42 Should return true if it registers something, or false otherwise.
48 =head2 $self->uri_for_action( $action, \@captures )
50 abstract method, to be implemented by dispatchtypes. Takes a
51 L<Catalyst::Action> object and an arrayref of captures, and should
52 return either a URI part which if placed in $c->req->path would cause
53 $self->match to match this action and set $c->req->captures to the supplied
54 arrayref, or undef if unable to do so.
58 sub uri_for_action { }
63 Sebastian Riedel, C<sri@cpan.org>
67 This program is free software, you can redistribute it and/or modify it under
68 the same terms as Perl itself.