OX - the manpage
file: code/MyApp/Controller.pm
1: package MyApp::Controller;
2: use Moose;
3:
4: has counter_model => (
5: is => 'ro',
6: isa => 'MyApp::Model',
7: required => 1,
8: );
9:
10: sub index {
11: my $self = shift;
12: return $self->counter_model->counter;
13: }
14:
15: sub inc {
16: my $self = shift;
17: return $self->counter_model->inc;
18: }
19:
20: sub dec {
21: my $self = shift;
22: return $self->counter_model->dec;
23: }
24:
25: sub reset {
26: my $self = shift;
27: return $self->counter_model->reset;
28: }
29:
30: sub set {
31: my ( $self, $req, $value ) = @_;
32:
33: return $self->counter_model->set($value);
34: }
35:
36: 1;