Commit | Line | Data |
---|---|---|
8e5d9092 | 1 | use CatalystX::Declare; |
2 | ||
3 | model TestApp::Model::TestModel { | |
4 | ||
5 | use MooseX::Types::Moose qw( Int ); | |
6 | ||
7 | has counter => ( | |
8 | is => 'rw', | |
9 | isa => Int, | |
10 | required => 1, | |
11 | default => 0, | |
12 | ); | |
13 | ||
14 | method next { | |
15 | $self->counter( $self->counter + 1 ); | |
16 | return $self->counter; | |
17 | } | |
18 | ||
19 | method reset { | |
20 | $self->counter(0); | |
21 | return 'reset'; | |
22 | } | |
23 | } |