Make go('/chained/action') execute the full chain, not just the endpoint.
[catagits/Catalyst-Runtime.git] / lib / Catalyst / DispatchType.pm
CommitLineData
b96f127f 1package Catalyst::DispatchType;
2
0fc2d522 3use Moose; # using it to add Moose::Object to @ISA ...
4no Moose;
b96f127f 5
2633d7dc 6=head1 NAME
b96f127f 7
2633d7dc 8Catalyst::DispatchType - DispatchType Base Class
b96f127f 9
2633d7dc 10=head1 SYNOPSIS
11
12See L<Catalyst>.
13
14=head1 DESCRIPTION
15
ac5c933b 16This is an abstract base class for Dispatch Types.
a486ab55 17
2633d7dc 18=head1 METHODS
19
b5ecfcf0 20=head2 $self->list($c)
a9cbd748 21
4ab87e27 22abstract method, to be implemented by dispatchtypes. Called to display
23info in debug log.
24
a9cbd748 25=cut
26
27sub list { }
28
b5ecfcf0 29=head2 $self->match( $c, $path )
2633d7dc 30
4ab87e27 31abstract method, to be implemented by dispatchtypes. Returns true if the
32dispatch type matches the given path
33
2633d7dc 34=cut
35
36sub match { die "Abstract method!" }
37
b5ecfcf0 38=head2 $self->register( $c, $action )
2633d7dc 39
4ab87e27 40abstract method, to be implemented by dispatchtypes. Takes a
ac5c933b 41context object and a L<Catalyst::Action> object.
4ab87e27 42
43Should return true if it registers something, or false otherwise.
44
2633d7dc 45=cut
46
a9cbd748 47sub register { }
2633d7dc 48
ea0e58d9 49=head2 $self->uri_for_action( $action, \@captures )
50
51abstract method, to be implemented by dispatchtypes. Takes a
52L<Catalyst::Action> object and an arrayref of captures, and should
53return 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
55arrayref, or undef if unable to do so.
56
57=cut
58
59sub uri_for_action { }
60
52f71256 61sub expand_action { }
62
2f381252 63=head1 AUTHORS
2633d7dc 64
2f381252 65Catalyst Contributors, see Catalyst.pm
2633d7dc 66
67=head1 COPYRIGHT
68
69This program is free software, you can redistribute it and/or modify it under
70the same terms as Perl itself.
71
72=cut
b96f127f 73
e5ecd5bc 74__PACKAGE__->meta->make_immutable;
75
b96f127f 761;