Fix Bill Moseley's double-auto bug, and add tests
[catagits/Catalyst-Runtime.git] / t / lib / TestApp / Controller / Action / Auto / Default.pm
1 package TestApp::Controller::Action::Auto::Default;
2
3 use strict;
4 use base 'TestApp::Controller::Action';
5
6 sub begin : Private { }
7
8 sub auto : Private {
9     my ( $self, $c ) = @_;
10     $c->stash->{auto_ran}++;
11     return 1;
12 }
13
14 sub default : Private {
15     my ( $self, $c ) = @_;
16     $c->res->body( sprintf 'default (auto: %d)', $c->stash->{auto_ran} );
17 }
18
19 sub end : Private { }
20
21 1;
22