| 1 | package Silki::Controller::Root; | ||
| 2 | { | ||
| 3 | $Silki::Controller::Root::VERSION = '0.29'; | ||
| 4 | } | ||
| 5 | |||
| 6 | use strict; | ||
| 7 | use warnings; | ||
| 8 | use namespace::autoclean; | ||
| 9 | |||
| 10 | use Moose; | ||
| 11 | |||
| 12 | BEGIN { extends 'Silki::Controller::Base' } | ||
| 13 | |||
| 14 | __PACKAGE__->config( namespace => q{} ); | ||
| 15 | |||
| 16 | sub robots_txt : Path('/robots.txt') : Args(0) { | ||
| 17 | my $self = shift; | ||
| 18 | my $c = shift; | ||
| 19 | |||
| 20 | $c->response()->content_type('text/plain'); | ||
| 21 | $c->response()->body("User-agent: *\nDisallow: /\n"); | ||
| 22 | } | ||
| 23 | |||
| 24 | __PACKAGE__->meta()->make_immutable(); | ||
| 25 | |||
| 26 | 1; | ||
| 27 | |||
| 28 | # ABSTRACT: Controller class for the root of the URI namespace | ||
| 29 | |||
| 30 | __END__ |