Skip to content

Instantly share code, notes, and snippets.

View sukria's full-sized avatar

ASK sukria

View GitHub Profile
package TestApp;
use Dancer;
set content_type => 'text/plain';
my $count;
#foreach my $a ('a' .. 'z') {
foreach my $b ('a' .. 'z') {
foreach my $c ('a' .. 'z') {
my $path = "${b}${c}";
<VirtualHost *:80>
ServerName galactica.yoolink
DocumentRoot /tmp/TestApp/public
AcceptPathInfo On
<Directory "/tmp/TestApp/public">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
App/Env Standalone CGI FastCGI
Hello NA 415 4017
PSGI 813 20 1360
Dancer 368 5 179
engines:
your_logger:
your_setting: 42
another_one: "foo"
sukria@razor:~/Development/Dancer$ perl -I/home/sukria/Development/Dancer/lib /tmp/test.pl
Sun Apr 4 16:37:15 2010 [1584] (core) loading Standalone handler in /home/sukria/Development/Dancer/lib/Dancer.pm l. 156
>> Dancer server 1584 listening on http://0.0.0.0:3000
== Entering the development dance floor ...
Sun Apr 4 16:37:22 2010 [1584] (core) request: GET /foo/23.json in /home/sukria/Development/Dancer/lib/Dancer/Handler/Standalone.pm l. 26
Sun Apr 4 16:37:22 2010 [1584] (core) route: /:resource/:id.:format in /home/sukria/Development/Dancer/lib/Dancer/Renderer.pm l. 24
Sun Apr 4 16:37:22 2010 [1584] (core) response: 200 in /home/sukria/Development/Dancer/lib/Dancer/Handler.pm l. 63
[10565] core @0.000066> request: GET / in /home/sukria/Development/Dancer/lib/Dancer/Handler/Standalone.pm l. 26
[10565] debug @0.002029> [Req. #4] entering / in TestApp.pm l. 7
[10565] warn @0.002107> [Req. #4] a warning in TestApp.pm l. 8
[10565] error @0.002156> [Req. #4] an error in TestApp.pm l. 9
[10565] core @0.002280> [Req. #4] route: / in /home/sukria/Development/Dancer/lib/Dancer/Renderer.pm l. 24
[10565] core @0.002600> [Req. #4] response: 200 in /home/sukria/Development/Dancer/lib/Dancer/Handler.pm l. 66
[10565] core @0.000066> request: GET / in /home/sukria/Development/Dancer/lib/Dancer/Handler/Standalone.pm l. 26
[10565] debug @0.002087> [Req. #5] entering / in TestApp.pm l. 7
[10565] warn @0.002172> [Req. #5] a warning in TestApp.pm l. 8
[10565] error @0.002222> [Req. #5] an error in TestApp.pm l. 9
sukria@razor:~/Development/Dancer$ cat /tmp/Foo/environments/development.yml
---
warnings: 1
show_errors: 1
auto_reload: 1
logger: "console"
log: "core"
plack_middlewares:
Debug:
- pannels
# app.pl
use Dancer;
use MyApp::Forum;
use MyApp:Home;
dance;
# lib/MyApp/Forum.pm
package MyApp::Forum;
22:33 sri : yea, so much spare energy and it's too warm outside for sport!
22:35 sri : so far i'm not even digging deeper, just showing the obvious flaws most web developers knowing sinatra would see instantly
22:36 sri : ruby folks already understand that there are now multple *classes* of web frameworks optimized for different tasks
22:39 sri : marketing wise a public fight with dancer would be priceless
22:40 sri : it gives the impression that there are only two options if done right
22:40 sri : and we can't lose that fight ;)
22:42 sri : taking on catalyst would be more effective, but i don't think there is someone passionate enough about it
23:02 sri : even dancer folks are rather underwhelming, seems like they don't really stand behind their project
23:09 sri : me ranting also works well for the revolutionary image i have in mind for mojolicious :D
# install Plack::Middleware::Debug and Dancer::Debug
# environments/development.yml
plack_middlewares:
Debug:
- panels
-
- Memory
- Dancer::Session