Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

33 lines (24 sloc) 0.648 kb
package MyApp::Controller;
use Moose;
use MooseX::NonMoose;
extends 'WebNano::Controller';
has 'url_map' => ( is => 'ro', default => sub { { 'mapped url' => 'mapped_url' } } );
sub index_action {
my $self = shift;
return $self->render( 'index.tt' );
}
sub mapped_url { 'This is the mapped url page' }
sub streaming_action {
my $self = shift;
return sub {
my $respond = shift;
my $writer = $respond->([
200,
[ 'Content-Type' => 'text/plain', ],
]);
$writer->write( "Hello, " );
$writer->write( $self->req->param( 'who' ) );
$writer->close();
}
}
1;
Jump to Line
Something went wrong with that request. Please try again.