plack/Plack — pull request #373 by miyagawa (2013-02-08 19:32:51+00:00)
Title: WIP: Add Plack::Util::convert_to_app($app) for warnings

WIP, since it gives some inconsistent warning when you use URLMap or manually apply middleware etc.

```
11:16 haarg: one concern is URLMap
11:16 miyagawa: the explicit URLMap or implicit?
11:17 haarg: seems like with that change you wouldn't get a warning but you would get per-request ->to_app for things mounted in a builder
11:17 miyagawa: oooh
11:18 miyagawa: good catch :)
11:18 miyagawa: but that's been the case already (till the change)
11:18 haarg: manually using middleware ->wrap() would also escape the warning
11:19 miyagawa: i could make to_app overload warn twice, or do the convert_to_app thing in URLmap
11:19 ether: it should be possible to recreate each of these scenarios in a unit test and catch the warnings with Test::Warn
11:19 haarg: that's why i was concerned about trying to do the checks in many places
11:19 miyagawa: it kinda annoys plackup -e 'Plack::App::File->new' warns though. Tried to special case -e (eval) but it looked a little complicated
```