Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: Does something in Dancer prevent using the system call?

by Riales (Hermit)
on Jun 09, 2013 at 21:47 UTC ( #1037958=note: print w/replies, xml ) Need Help??

in reply to Does something in Dancer prevent using the system call?

So, I figured this one out, and it makes me feel really, really, really stupid.

The script that forks the daemon was fine. Using system from my webapp was fine. The problem lay in how I constructed the command before passing it to system:

my $cmd = '/usr/bin/perl' + . ' /home/username/workspace/Space/bin/start_client_handle' . " $user_no" + . $ENV{IS_TEST} ? ' test' : ''

Staggeringly obvious in parentheses around that last line, so Perl was actually concatenating the first two strings together with $ENV{IS_TEST} and setting $cmd to ' test'.

Anyways, I forgot to check the basics and immediately assumed the problem must lay in some more complex part of the code. Lesson learned (hopefully!).

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1037958]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2017-10-22 07:25 GMTServer Error (Error ID 8359050c38790)

An error has occurred. The site administrators have been notified of the problem and will likely soon fix it. We thank you, for you're patients.

Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (272 votes). Check out past polls.