Skip to content

Instantly share code, notes, and snippets.

View TristinDavis's full-sized avatar

Tristin Davis TristinDavis

  • Thrivent Financial
  • Arkansas, USA
  • 21:32 (UTC -06:00)
View GitHub Profile
@sharifulin
sharifulin / gist:335531
Created March 17, 2010 18:11
Nested layouts for the Mojolicious
#!/usr/bin/env perl
use Mojolicious::Lite;
get '/' => 'index';
get '/ok' => 'index_ok';
use Test::More;
plan tests => 6;
@sharifulin
sharifulin / gist:292838
Created February 2, 2010 17:22
Mojo uploads
#!/usr/bin/env perl
use lib '../mojo/lib';
BEGIN { $ENV{MOJO_TMPDIR} = 'tmp/upload' };
use Mojolicious::Lite;
use Data::Dumper;
get '/' => 'form';
post '/' => sub {
@sharifulin
sharifulin / gist:282378
Created January 20, 2010 22:53
Mojo: bug in routes
#!/usr/bin/perl
use strict;
use lib qw(lib ../mojo/lib);
$ENV{MOJO_APP} ||= 'App';
use Mojolicious::Commands; Mojolicious::Commands->start;
package App;
use strict;