Recommended omoon.org の裏側 〜FuelPHP の task 活用例〜
15分でCakePHPを始める方法(Nseg 2013-11-09 )
Cinnamon - simple deploy tool
Mojoliciousをウェブ制作現場で使ってみてる
Norikraで作るPHPの例外検知システム YAPC::Asia Tokyo 2015 LT
Scripting Layer for Android + Perl
Perl Casual #1 - Config Pit
FuelPHPで3種のprofilerを使ってみた
Perl Hobby Programming - Games::BeLike::EightBIT ターミナルで8ビット風ゲームをつくろう
『How to build a High Performance PSGI/Plack Server』のその後と ISUCON3を受けての話題
CGI::Application::Dispatch
SmartPhone development guide with CoffeeScript + Node + HTML5 Technology, for...
The master plan ofscaling a web application
ReVIEWとLibreOfficeとOMakeで本を書きましょう!
Sinatra and heroku for mac
Open Source System Administration Framework - Func
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
More Related Content omoon.org の裏側 〜FuelPHP の task 活用例〜
15分でCakePHPを始める方法(Nseg 2013-11-09 )
Cinnamon - simple deploy tool
Mojoliciousをウェブ制作現場で使ってみてる
Norikraで作るPHPの例外検知システム YAPC::Asia Tokyo 2015 LT
What's hot
Scripting Layer for Android + Perl
Perl Casual #1 - Config Pit
FuelPHPで3種のprofilerを使ってみた
Perl Hobby Programming - Games::BeLike::EightBIT ターミナルで8ビット風ゲームをつくろう
『How to build a High Performance PSGI/Plack Server』のその後と ISUCON3を受けての話題
CGI::Application::Dispatch
SmartPhone development guide with CoffeeScript + Node + HTML5 Technology, for...
The master plan ofscaling a web application
ReVIEWとLibreOfficeとOMakeで本を書きましょう!
Sinatra and heroku for mac
Open Source System Administration Framework - Func
Viewers also liked
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
Games::* - Perlで 「ゲーム」しよう #hokkaidopm
"Ops Tools with Perl" 2012/05/12 Hokkaido.pm
YAPC::Asia 2013 - CPAN Testers Reports の情報を上手に使う
Plack::Request with Encoding
Similar to Using Dancer WTM53 phpフレームワーク いまさらcodeigniter
泥臭い運用から、プログラマブルインフラ構築(に行きたい)
Movable Type for AWS - JAWS-UG 沖縄 CMS祭り!
「新しい」を生み出すためのWebアプリ開発とその周辺
AnyEventとEC2を使ったクローリングツールのご紹介
eZ Publish勉強会2013年3月「eZ Publishの構築を簡単に!」
平均レスポンスタイム50msをPerlで捌く中規模サービスの実装/運用
JavaFX + NetBeans環境におけるJenkinsの活用(Jenkins第六回勉強会)
Web Operations and Perl kansai.pm#14
WebAppDev勉強会 #2 at cafe? IKAGAWA DO
関西オープンソース 2008 30days Albumの裏側
Recently uploaded 論文紹介:"Reflexion: language agents with verbal reinforcement learning", "MA-LMM...
論文紹介:"MM-Tracker: Motion Mamba for UAV-platform Multiple Object Tracking", "M...
手軽に広範囲でプライバシーを守りながら人数カウントできる ~ LoRaWAN AI人流カウンター PF52 日本語カタログ
ReflecTrace: Hover Interface using Corneal Reflection Images Captured by Smar...
論文紹介:Simultaneous Detection and Interaction Reasoning for Object-Centric Acti...
論文紹介: "Locality-Aware Zero-Shot Human-Object Interaction Detection" "Disentan...
歴史好きのスクラム話 JBUG名古屋#5 AI時代のデータドリブンなプロジェクト管理
How We Operated Ticket-Driven Development in JIRA.pdf
Using Dancer 1. 2. 3. 4. 5. 6. 7. 8. 9. まず初めに @riywoさん お越し頂きありがとうございます! 10. 11. 12. 13. 14. 15. 17. 18. 19. 20. 21. 22. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. EXPORTS config redirect cookie request debug send_error forward set get session layout template param uri_for post その他諸々 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. もっと知りたい方は Dancer plugins ecosystem http://advent.perldancer.org/2011/17 55. Pluginの作り方 package Dancer::Plugin::LinkBlocker; use Dancer ':syntax'; use Dancer::Plugin; register block_links_from => sub { my $conf = plugin_setting(); my $re = join( '|', @{ $conf->{hosts} } ); before sub { if ( request->referer && request->referer =~ /$re/ ) { status 403 || $conf->{http_code}; } }; }; register_plugin; 1; 56. 57. 58. 59. 60. 61. 62. 63. httpd.conf <VirtualHost *:80> ServerName www.example.com DocumentRoot /srv/www.example.com/public ServerAdmin you@example.com <Directory "/srv/www.example.com/public"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all AddHandler cgi-script .cgi </Directory> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /dispatch.cgi/$1 [QSA,L] ErrorLog /var/log/apache2/www.example.com-error.log CustomLog /var/log/apache2/www.example.com-access_log common </VirtualHost> 64. 65. Routing get '/' => sub { return 'Hello, world'; }; any ['get','post'] => '/' => sub { ... }; 66. 67. Request Parameters get '/' => sub { my $id = param 'id'; }; post '/' => sub { my $id = param 'id'; my $file = upload('file'); # Dancer::Request::Upload object $file->copy_to('/path/to/flie'); }; 68. Request Parameters # GET /entry/foo?id=bar get '/entry/:id' => sub { my $id = param 'id'; # $id => foo }; # 追記 paramsを使えばデータソース別に取れます # perldoc Dancer::Request # Fetching_only_params_from_a_given_source 69. 70. Cookie get '/login' => sub { my $id = param 'id'; my $password = param 'password'; if ( $id eq 'cto' && $password eq 'onagatani' ) { cookie 'logged_in' => 1; redirect '/'; } }; 71. Session set session => 'YAML'; set session_dir => '/tmp/sessions'; set session_name => 'sid'; # default dancer.session get '/login' => sub { my $id = param 'id'; my $password = param 'password'; if ( $id eq 'cto' && $password eq 'onagatani' ) { session 'user' => { name => 'onagatani' }; redirect '/'; } }; 72. 73. 74. 75. 76. Redirect get '/foo' => sub { redirect '/myaction'; }; get '/bar' => sub { # internal redirect forward '/myaction'; }; 77. Logging set logger => 'console'; set log => 'debug'; get '/logging' => sub { core 'foo'; debug 'bar'; info 'baz'; warning 'hoge'; error 'piyo'; }; 78. 79.