File: Detach.pm

package info (click to toggle)
libcatalyst-perl 5.90132-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,016 kB
  • sloc: perl: 11,061; makefile: 7
file content (37 lines) | stat: -rw-r--r-- 762 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package TestApp::Controller::Action::Auto::Detach;

use strict;
use base 'TestApp::Controller::Action';

sub auto : Private {
    my ( $self, $c ) = @_;
    $c->res->body( "detach auto" );
    if ($c->req->param("with_forward_detach")) {
        $c->forward("with_forward_detach");
    } else {
        $c->detach;
    }
    return 1;
}

sub default : Path {
    my ( $self, $c ) = @_;
    $c->res->body( 'detach default' );
}

sub with_forward_detach : Private {
    my ($self, $c) = @_;
    $c->res->body( "detach with_forward_detach" );
    if ($c->req->param("detach_to_action")) {
        $c->detach("detach_action");
    } else {
        $c->detach;
    }
}

sub detach_action : Private {
    my ($self, $c) = @_;
    $c->res->body("detach_action");
}

1;