Skip to content

Instantly share code, notes, and snippets.

@fgabolde
Created December 27, 2013 10:14
Show Gist options
  • Save fgabolde/8144948 to your computer and use it in GitHub Desktop.
Save fgabolde/8144948 to your computer and use it in GitHub Desktop.
Example Floop app with sugar applied.
use strict;
use warnings;
use 5.010;
use Carp;
use mop;
use Floop::Confectionery;
class Plomo extends Floop {
method BUILD {
$self->install_plugin('DBIC');
$self->install_plugin('Session', 'YAML');
$self->register_view(html => 'Floop::View::TemplateToolkit');
$self->set_default_view('html');
sugarcoat($self);
}
method das_route ($app: $context) is GET('/jelly_baby') {
push @{$context->response->body}, 'hallelujah';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment