in reply to Returning string and numerical data types from subroutines
As an alternative approach, using die to throw an exception on failure can get you out of this problem.
Now, daemonize doesn't need to return anything. An eval block and test of $@ covers the error case. Any code immediately after the daemonize call is in the success case.
Of course, you can replace the die/eval with one of the exception modules.
Many may argue whether this is a better solution or not, but it would avoid your current problem.
|
|---|