1 package ESITest::Controller::Root;
5 use parent 'Catalyst::Controller';
7 __PACKAGE__->config->{namespace} = '';
9 sub index :Path Args(0) {
10 my ( $self, $c ) = @_;
13 sub base : Chained('/') PathPart('') CaptureArgs(0) {
14 my ( $self, $c ) = @_;
17 sub time_include : Chained('base') PathPart('time') Args(0) {
18 my ( $self, $c ) = @_;
19 my $params = $c->req->params;
21 $c->stash->{current_time} = localtime();
24 for my $key (keys %$params) {
25 $additional .= "| $key = $params->{$key} | "
28 $c->stash->{additional} = $additional;
32 sub capture : Chained('base') PathPart('') CaptureArgs(1) {
33 my ( $self, $c, $arg ) = @_;
34 $c->log->debug("Capture: $arg");
35 $c->stash->{additional} = "Arg: $arg";
38 sub time_args : Chained('capture') PathPart('time') Args(0) {
39 my ( $self, $c ) = @_;
40 my $params = $c->req->params;
42 $c->stash->{current_time} = localtime();
44 my $additional = $c->stash->{additional};
45 for my $key (keys %$params) {
46 $additional .= "| $key = $params->{$key} | "
49 $c->stash->{additional} = $additional;
51 $c->stash->{template} = 'time_include.tt';
54 sub end : ActionClass('RenderView') {}