| 1 | package Catalyst::Plugin::RedirectAndDetach; | ||
| 2 | |||
| 3 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 1 | our $VERSION = '0.03'; | |
| 7 | |||
| 8 | 1 | ▶ | use Params::Validate qw( validate_pos SCALAR OBJECT ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | |||
| 11 | { | ||
| 12 | 1 | my @spec = ( { type => SCALAR | OBJECT }, | |
| 13 | { type => SCALAR, default => undef } ); | ||
| 14 | |||
| 15 | sub redirect_and_detach | ||
| 16 | 0 | ▶ | { |
|
Subroutine
redirect_and_detach: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 17 | 0 | my $self = shift; | |
| 18 | 0 | my ( $uri, $status ) = validate_pos( @_, @spec ); | |
| 19 | |||
| 20 | 0 | $self->response()->redirect( $uri, $status ); | |
| 21 | |||
| 22 | 0 | $self->detach(); | |
| 23 | } | ||
| 24 | } | ||
| 25 | |||
| 26 | 1 | 1; | |
| 27 | |||
| 28 | __END__ | ||