1 package Catalyst::DispatchType;
5 use Moose; # using it to add Moose::Object to @ISA ...
10 Catalyst::DispatchType - DispatchType Base Class
18 This is an abstract base class for Dispatch Types.
22 =head2 $self->list($c)
24 abstract method, to be implemented by dispatchtypes. Called to display
31 =head2 $self->match( $c, $path )
33 abstract method, to be implemented by dispatchtypes. Returns true if the
34 dispatch type matches the given path
38 sub match { die "Abstract method!" }
40 =head2 $self->register( $c, $action )
42 abstract method, to be implemented by dispatchtypes. Takes a
43 context object and a L<Catalyst::Action> object.
45 Should return true if it registers something, or false otherwise.
51 =head2 $self->uri_for_action( $action, \@captures )
53 abstract method, to be implemented by dispatchtypes. Takes a
54 L<Catalyst::Action> object and an arrayref of captures, and should
55 return either a URI part which if placed in $c->req->path would cause
56 $self->match to match this action and set $c->req->captures to the supplied
57 arrayref, or undef if unable to do so.
61 sub uri_for_action { }
66 Sebastian Riedel, C<sri@cpan.org>
70 This program is free software, you can redistribute it and/or modify it under
71 the same terms as Perl itself.
75 __PACKAGE__->meta->make_immutable;