in reply to Data structures not returned via POE::Filter::Reference
As I see it, your plugin is calling print("task....") which is not in the POE::Filter::Reference format. The parent process is trying to parse the child's output in a particular format, which it's not getting. As a result, the parent isn't displaying the output.
You can use STDERR as a plaintext back channel. Change the print() to warn(), and set up the POE::Wheel::Run object to use POE::Filter::Line for its StderrFilter:
Untested, of course. :)$_[HEAP]{child} = POE::Wheel::Run( ... stuff ..., StdinFilter => POE::Filter::Reference->new(), StdoutFilter => POE::Filter::Reference->new(), StderrFilter => POE::Filter::Line->new(), );
Then handle StderrEvent in the parent. As an added bonus, any errors or warnings in the child will be displayed by the parent. It's great for debugging the child process.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Data structures not returned via POE::Filter::Reference
by swares (Monk) on Apr 08, 2008 at 16:21 UTC |