1 package Gitalist::Controller::Root;
5 use parent 'Catalyst::Controller';
8 # Sets the actions in this controller to be registered with no prefix
9 # so they function identically to actions created in MyApp.pm
11 __PACKAGE__->config->{namespace} = '';
15 Gitalist::Controller::Root - Root Controller for Gitalist
19 [enter your description here]
29 #sub index :Path :Args(0) {
30 # my ( $self, $c ) = @_;
33 # $c->response->body( $c->welcome_message );
36 use IO::Capture::Stdout;
39 my ( $self, $c ) = @_;
41 my $capture = IO::Capture::Stdout->new();
43 eval { gitweb::main($c) };
46 my $output = join '', $capture->read;
47 $c->stash->{content} = $output;
48 $c->stash->{template} = 'default.tt2';
53 Attempt to render a view, if needed.
57 sub end : ActionClass('RenderView') {}
65 This library is free software. You can redistribute it and/or modify
66 it under the same terms as Perl itself.