use Catalyst qw[-Engine=Test];
-__PACKAGE__->action(
- foo => sub {
- my ( $self, $c ) = @_;
- $c->res->redirect('http://localhost/bar');
- }
-);
+sub foo : Global {
+ my ( $self, $c ) = @_;
+ $c->res->redirect('http://localhost/bar');
+}
+
+__PACKAGE__->setup;
package main;