4 Apr
2010
4 Apr
'10
7:24 a.m.
2010/4/3 XANi <xani666@gmail.com>:
Dnia 2010-04-03, sob o godzinie 01:36 +0300, Gabor Szabo pisze:
Imo simplest solution would be to just run separate thread, something like:
use threads; my $t = threads->create(\&browser); dance;
sub browser () { sleep 1 ; Browser::Open::open_browser("http://localhost:3000/"); }
I use now fork() but more or less the same idea. my $pid fork(); die if not defined $pid; if ($pid) { dance; } else { sleep 1; Browser::Open::open_browser("http://localhost:3000/"); } but that still does not take in account the --port the user can supply nor does it check if the dancer server really starter successfully. regards Gabor