Just guessing... you can try something like this:

    # whatever you have before the call to "dance()"...
    $SIG{INT} = sub { exit(0) };
    dance();

and then hit Ctrl-C. If you suspect that SIGINT is handled by Dancer, you can try to set the same exiting sub for another signal and use kill from the command line of course.

Cheers,

    Flavio.


On Sat, Jul 9, 2011 at 9:34 AM, Gurunandan Bhat <gbhat@pobox.com> wrote:
Hi,

D::NYTProf requires that the profiled application exit cleanly. Dancer::dance does not return and the only way to exit a dancer app (to my limited knowledge) is to either hit Ctrl-C or kill -HUP if running with -d.

How can I exit a Dancer app cleanly so that NYTProf can write its profile

Thanks!

_______________________________________________
Dancer-users mailing list
Dancer-users@perldancer.org
http://www.backup-manager.org/cgi-bin/listinfo/dancer-users