plack/Plack — pull request #415 by ChinaXing (2013-06-15 12:35:58+00:00)
Title: Add "app_builder" type of argument for Plack::Runner

when I use ```Plack::Runner``` to plackup pice of code to run, i found it can not supply some code ran at each time of the server was loaded (especially reloaded), for exmaple :

package Te::Myblog;
#use HiD; # is a static blog builder
use Plack::Runner;

my $hid = $self->build_hid;
my $app = sub {
$hid->rebuild;
return Plack::App::File->new(root => $self->destination )->to_app;
};

my $runner = Plack::Runner->new;
$runner->parse_options('-r', '-R' => $self->source_dir);
$runner->run($app);

then, the plack server will restart when it found the directory 's file changed;
when the server restart, I hope I can do some work incidentally ， here is rebuild the blog；

I found the ```Plack::Runner::locate_app``` method will treat code ref of app as :

(https://github.com/plack/Plack/blob/master/lib/Plack/Runner.pm#L160)

if (ref $psgi eq 'CODE') {
return sub { $psgi };
}

so, I append a pice of code, to satisfy my requirement

hopen you can merge it to your wonderful code. that's great for everyone to use it :)

Very thanks !