1 package Catalyst::DispatchType;
4 use base 'Class::Accessor::Fast';
8 Catalyst::DispatchType - DispatchType Base Class
18 =head2 $self->list($c)
20 abstract method, to be implemented by dispatchtypes. Called to display
27 =head2 $self->match( $c, $path )
29 abstract method, to be implemented by dispatchtypes. Returns true if the
30 dispatch type matches the given path
34 sub match { die "Abstract method!" }
36 =head2 $self->register( $c, $action )
38 abstract method, to be implemented by dispatchtypes. Takes a
39 context object and a L<Catalyst::Action> object.
41 Should return true if it registers something, or false otherwise.
47 =head2 $self->uri_for_action( $action, \@captures )
49 abstract method, to be implemented by dispatchtypes. Takes a
50 L<Catalyst::Action> object and an arrayref of captures, and should
51 return either a URI part which if placed in $c->req->path would cause
52 $self->match to match this action and set $c->req->captures to the supplied
53 arrayref, or undef if unable to do so.
57 sub uri_for_action { }
62 Sebastian Riedel, C<sri@cpan.org>
66 This program is free software, you can redistribute it and/or modify it under
67 the same terms as Perl itself.