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
syntax on | |
filetype on | |
filetype plugin indent on | |
let perl_include_pod = 1 | |
let perl_extended_vars = 0 | |
let perl_want_scope_in_variables = 1 | |
let perl_fold = 1 | |
let perl_fold_blocks = 1 | |
set foldenable |
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 EV; | |
use AnyEvent; | |
# Simple delayed rendering | |
get '/' => sub { | |
my $self = shift; | |
my $w; | |
$w = AE::timer 3, 0, sub { |
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
# Assuming this directory structure: | |
# | |
# MyModule/ | |
# init.io # => Object clone do( foo := "bar" ) | |
# slot1.io # => "LOL" | |
# slot2.io # => method("running slot2" println; self) | |
# slot3/ | |
# subslot1.io # => "this is subslot1" | |
import("/path/to/MyModule") |
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
Protos AssertionException := Exception clone | |
Object do( | |
assert := method(v, m, | |
if(true != v, | |
m ifNil(m = "true != (#{ call argAt(0) })" interpolate) | |
AssertionException raise(m) | |
) | |
) |
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/perl | |
use 5.10.1; | |
use strict; | |
use warnings; | |
use HTTP::Request::Common 'POST'; | |
use AnyEvent::HTTP; | |
use Benchmark; |
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
HTML = Object clone | |
Association = Object clone | |
a -> b := Association clone do: { from = a; to = b } | |
Self-Closing = ["base", "meta", "link", "hr", "br", "param", "img", "area", "input", "col", "frame"] | |
-- creating elements with no content | |
-- keyword dispatch adds attributes |
NewerOlder