Human Factors of XR: Using Human Factors to Design XR Systems
Schenker - DSL for quickly creating web applications in Perl
1. Jiro Nishiguchi( 西口次郎 ) id:spiritloose [email_address] 2009/09/09 Yokohama.pm 出張版 in YAPC::Asia 2009 前夜祭 Schenker a DSL for quickly creating web applications in Perl.
30. Command line options ./myapp.pl --help Usage: ./hoge.pl [OPTIONS] -h, --help display this help -H, --host set the host -p, --port=PORT set the port -e, --environment=ENV set the environment -s, --server=SERVER HTTP::Engine interface === snip ===
31. Configuration configure development => sub { set port => 8080; set host => '127.0.0.1'; set server => 'AnyEvent'; enable 'sessions'; disable 'run'; };
32. Routing get '/' => sub {}; post '/' => sub {}; put '/' => sub {}; Delete '/' => sub {}; get '/' => host => 'example.com' => sub {}; get '/' => agent => qr/MobileSafari/ => sub {};
33. Method override <form action=”/” method=”post”> <input type=”hidden” name=”_method” value=”put” /> post '/' => sub {}; put '/' => sub {};
36. Path paramaters get '/user/:user' => sub { my $args = shift; "hello, $args->{user}!"; };
37. Encoding set encode => { encode => 'utf-8', decode => 'utf-8' }; get '/user/:name' => sub { my $args = shift; ok utf8::is_utf8($args->{name}); ok utf8::is_utf8(params->{foo}); };