Switched to Module::Install
[catagits/Catalyst-Runtime.git] / t / lib / TestApp / Controller / Engine / Response / Redirect.pm
1 package TestApp::Controller::Engine::Response::Redirect;
2
3 use strict;
4 use base 'Catalyst::Base';
5
6 sub one : Relative {
7     my ( $self, $c ) = @_;
8     $c->response->redirect('/test/writing/is/boring');
9 }
10
11 sub two : Relative {
12     my ( $self, $c ) = @_;
13     $c->response->redirect('http://www.google.com/');
14 }
15
16 sub three : Relative {
17     my ( $self, $c ) = @_;
18     $c->response->redirect('http://www.google.com/');
19     $c->response->status(301); # Moved Permanently
20 }
21
22 sub four : Relative {
23     my ( $self, $c ) = @_;
24     $c->response->redirect('http://www.google.com/');
25     $c->response->status(307); # Temporary Redirect
26 }
27
28 1;
29