1 package TestApp::Controller::Moose;
5 BEGIN { extends qw/Catalyst::Controller/; }
7 has attribute => ( # Test defaults work
12 has other_attribute => ( # Test BUILD method is called
16 has punctuation => ( # Test BUILD method gets merged config
20 has space => ( # Test that attribute slots get filled from merged config
26 __PACKAGE__->config(the_punctuation => ':');
27 __PACKAGE__->config(space => ' '); # i am pbp, icm5ukp
30 my ($self, $config) = @_;
31 # Note, not an example of something you would ever
32 $self->other_attribute('the meaning of life');
33 $self->punctuation( $config->{the_punctuation} );
36 sub the_answer : Local {
38 $c->response->body($self->other_attribute . $self->punctuation . $self->space . $self->attribute);