Don't run the moose controller test if Moose isn't available
[catagits/Catalyst-Runtime.git] / lib / Catalyst / DispatchType.pm
CommitLineData
b96f127f 1package Catalyst::DispatchType;
2
3use strict;
2633d7dc 4use base 'Class::Accessor::Fast';
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
a486ab55 16This is an abstract base class for Dispatch Types.
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
41context object and a L<Catalyst::Action> object.
42
43Should return true if it registers something, or false otherwise.
44
2633d7dc 45=cut
46
a9cbd748 47sub register { }
2633d7dc 48
f9bcc128 49=head2 $self->expand_action
50
51Default fallback, returns nothing. See L<Catalyst::Dispatcher> for more info
52about expand_action.
53
54=cut
55
56sub expand_action { }
57
ea0e58d9 58=head2 $self->uri_for_action( $action, \@captures )
59
60abstract method, to be implemented by dispatchtypes. Takes a
61L<Catalyst::Action> object and an arrayref of captures, and should
62return either a URI part which if placed in $c->req->path would cause
63$self->match to match this action and set $c->req->captures to the supplied
64arrayref, or undef if unable to do so.
65
66=cut
67
68sub uri_for_action { }
69
0bf7ab71 70=head1 AUTHORS
2633d7dc 71
0bf7ab71 72Catalyst Contributors, see Catalyst.pm
2633d7dc 73
74=head1 COPYRIGHT
75
76This program is free software, you can redistribute it and/or modify it under
77the same terms as Perl itself.
78
79=cut
b96f127f 80
811;