Commit | Line | Data |
---|---|---|
75f37967 | 1 | # Copyright (c) 2007 Jonathan Rockway <jrockway@cpan.org> |
2 | ||
3 | package TestApp::Model::Test; | |
4 | use strict; | |
5 | use warnings; | |
6 | use base qw(Catalyst::Component::ACCEPT_CONTEXT Catalyst::Model); | |
7 | ||
8 | my $foo = 'bar'; | |
9 | sub new { | |
10 | my $self = shift; | |
11 | $self = $self->NEXT::new(@_); | |
12 | $foo = $self->context->config->{foo}; | |
13 | return $self; | |
14 | } | |
15 | ||
16 | sub message { | |
17 | my $self = shift; | |
18 | return $self->context->stash->{message}; | |
19 | } | |
20 | ||
21 | sub foo { | |
22 | return $foo; | |
23 | } | |
24 | ||
25 | 1; | |
26 |