This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use Mojolicious::Lite; | |
use Test::Mojo; | |
use Test::More tests => 2; | |
get '/first' => sub { | |
shift->redirect_to('second'); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use Mojolicious::Lite; | |
use Test::Mojo; | |
use Test::More tests => 2; | |
get '/first' => sub { | |
shift->redirect_to('second'); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# put.pl | |
# This works : | |
# ./put.pl daemon | |
# mojo get --method PUT --content 'foo' --header 'X-Disk: /tmp' http://localhost:3000/here | |
# This does not : | |
# ./put.pl get --method PUT --content 'foo' --header 'X-Disk: /tmp' /here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# put.t | |
use Test::More tests => 3; | |
use Mojolicious::Lite; | |
use Test::Mojo; | |
$ENV{MOJO_MAX_MEMORY_SIZE} = 2; # Force temp files. | |
$ENV{MOJO_TMPDIR} = "/nosuchdir"; # test setting tempdir dynamically |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# put.pl | |
# This works : | |
# ./put.pl daemon | |
# mojo get --method PUT --content 'foo' --header 'X-Disk: /tmp' http://localhost:3000/here | |
# This does not : | |
# ./put.pl get --method PUT --content 'foo' --header 'X-Disk: /tmp' /here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!perl | |
package TestApp; | |
use Mojolicious::Lite; | |
get '/one/:foo' => [ foo => [qw/bar barfly/] ] => sub { shift->render_text('hi') }; | |
get '/two/:foo' => [ foo => qr[bar|barfly] ] => sub { shift->render_text('hi') }; | |
package main; | |
use Test::More tests => 8; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use IO::Async::Channel; | |
use IO::Async::Loop; | |
use IO::Async::Routine; | |
my $loop = IO::Async::Loop->new(); | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
[ | |
{ | |
"class": "sidebar_container", | |
"layer0.tint": [60, 60, 60], | |
"layer0.opacity": 1.0, | |
"layer0.draw_center": false, | |
"layer0.inner_margin": [0, 0, 1, 0], | |
"content_margin": [0, 0, 1, 0] | |
}, | |
{ |