This file contains 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 Mango; | |
use Mango::BSON 'bson_oid'; | |
helper mango => sub { state $mango = Mango->new($ENV{PASTEDB}) }; | |
helper pastes => sub { shift->mango->db->collection('pastes') }; | |
get '/' => 'submit'; |
This file contains 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 strict; | |
use warnings; | |
use feature ':5.10'; | |
use AnyEvent; | |
use AnyEvent::Handle; | |
open my $fd, '|-', 'perl -ne "sleep 1; print"' or die $!; |