DispatchType stripped of CAF, SUPER and substituted instances of $self->{*} with...
[catagits/Catalyst-Runtime.git] / lib / Catalyst / DispatchType.pm
CommitLineData
b96f127f 1package Catalyst::DispatchType;
2
3c0186f2 3use Moose;
b96f127f 4
2633d7dc 5=head1 NAME
b96f127f 6
2633d7dc 7Catalyst::DispatchType - DispatchType Base Class
b96f127f 8
2633d7dc 9=head1 SYNOPSIS
10
11See L<Catalyst>.
12
13=head1 DESCRIPTION
14
3c0186f2 15This is an abstract base class for Dispatch Types.
a486ab55 16
2633d7dc 17=head1 METHODS
18
b5ecfcf0 19=head2 $self->list($c)
a9cbd748 20
4ab87e27 21abstract method, to be implemented by dispatchtypes. Called to display
22info in debug log.
23
a9cbd748 24=cut
25
26sub list { }
27
b5ecfcf0 28=head2 $self->match( $c, $path )
2633d7dc 29
4ab87e27 30abstract method, to be implemented by dispatchtypes. Returns true if the
31dispatch type matches the given path
32
2633d7dc 33=cut
34
35sub match { die "Abstract method!" }
36
b5ecfcf0 37=head2 $self->register( $c, $action )
2633d7dc 38
4ab87e27 39abstract method, to be implemented by dispatchtypes. Takes a
3c0186f2 40context object and a L<Catalyst::Action> object.
4ab87e27 41
42Should return true if it registers something, or false otherwise.
43
2633d7dc 44=cut
45
a9cbd748 46sub register { }
2633d7dc 47
ea0e58d9 48=head2 $self->uri_for_action( $action, \@captures )
49
50abstract method, to be implemented by dispatchtypes. Takes a
51L<Catalyst::Action> object and an arrayref of captures, and should
52return 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
54arrayref, or undef if unable to do so.
55
56=cut
57
58sub uri_for_action { }
59
2633d7dc 60=head1 AUTHOR
61
62Matt S Trout
63Sebastian Riedel, C<sri@cpan.org>
64
65=head1 COPYRIGHT
66
67This program is free software, you can redistribute it and/or modify it under
68the same terms as Perl itself.
69
70=cut
b96f127f 71
721;