moritz/ilbot — pull request #4 by berekuk (2012-06-03 22:23:55+00:00)
Title: Convert to PSGI

Ok, it's basically working.

Things I checked:

* channel list
* channel index
* log
* `?admin=1` mode and spam
* search by nick

Couldn't check search by text - I hacked ilbot to run on sqlite before I went for PSGI port, and it's basically working, but search by text relies on mysql dialect. I intend to send sqlite patch separately.

Main app is ilbot.psgi. I used manual routing there.
Didn't want to use `Dancer` or any other framework, and `Plack::Middleware::Rewrite` didn't work for me - see https://github.com/ap/Plack-Middleware-Rewrite/issues/2.
So routing part is a bit messy, but I think it's still improvement comparing to mod_rewrite :)

I *did* support backward compatibility for `/out.pl`, since it was supported in old `.htaccess` file.

One important thing I didn't test is whether it's working when app's base url is not `/`.

Oh, and tests are failing. Will get to fixing them now, don't merge this yet :)