Re: non-interactive child processes?

2007-01-20 Thread Matt Sickler

sounds like a simple Component wrapper - POE::Component::Child::Simple or
something
your description of what you want is nearly pseudo code

you might want to look into PoCo::Child or the likes, I personally havent
used them so I dont know anything about them.

On 1/20/07, Kevin Scaldeferri <[EMAIL PROTECTED]> wrote:


Yes, but you can't just provide a CloseEvent to Wheel::Run, and the
arguments that CloseEvent are called with do not include any of the
output of the program.

What I'm talking about is basically having a StdoutEvent that
concatenates all the output and stores it in the heap, and a
StderrEvent that does something similar, and then a CloseEvent that
reads that stuff out of the heap and processes it.  But, I'd rather
not have all my users have to do that, so what I'm looking for is a
simplified API that hides all that.  It doesn't seem that hard to do,
but I can't find anything published on CPAN that does it.


-kevin


On Jan 19, 2007, at 11:02 PM, Matt Sickler wrote:

> I believe you can use Wheel::Run and theres a CloseEvent or the like
>
> On 1/20/07, Kevin Scaldeferri <[EMAIL PROTECTED]> wrote:
>>
>> I figure I can write this myself easily enough, but I'm wondering if
>> there's a module already for this task.  I want to run command-line
>> functions which I know to be non-interactive.  Of course,
>> POE::Wheel::Run and POE::Component::Child can do this, but their
>> interfaces are overly complicated for what I need in this
>> application.  I'm not expecting to need to write anything to the
>> child process, so rather than incrementally receiving data from
>> stdout and stderr, I'd rather just defer until the process terminates
>> and then have a single callback called with all the stdout and all
>> the stderr and the exit code.  Am I missing a module that does this
>> already?
>>
>> Thanks,
>>
>> -kevin
>>




Re: non-interactive child processes?

2007-01-20 Thread Kevin Scaldeferri
Yes, but you can't just provide a CloseEvent to Wheel::Run, and the  
arguments that CloseEvent are called with do not include any of the  
output of the program.


What I'm talking about is basically having a StdoutEvent that  
concatenates all the output and stores it in the heap, and a  
StderrEvent that does something similar, and then a CloseEvent that  
reads that stuff out of the heap and processes it.  But, I'd rather  
not have all my users have to do that, so what I'm looking for is a  
simplified API that hides all that.  It doesn't seem that hard to do,  
but I can't find anything published on CPAN that does it.



-kevin


On Jan 19, 2007, at 11:02 PM, Matt Sickler wrote:


I believe you can use Wheel::Run and theres a CloseEvent or the like

On 1/20/07, Kevin Scaldeferri <[EMAIL PROTECTED]> wrote:


I figure I can write this myself easily enough, but I'm wondering if
there's a module already for this task.  I want to run command-line
functions which I know to be non-interactive.  Of course,
POE::Wheel::Run and POE::Component::Child can do this, but their
interfaces are overly complicated for what I need in this
application.  I'm not expecting to need to write anything to the
child process, so rather than incrementally receiving data from
stdout and stderr, I'd rather just defer until the process terminates
and then have a single callback called with all the stdout and all
the stderr and the exit code.  Am I missing a module that does this
already?

Thanks,

-kevin





Re: non-interactive child processes?

2007-01-19 Thread Matt Sickler

I believe you can use Wheel::Run and theres a CloseEvent or the like

On 1/20/07, Kevin Scaldeferri <[EMAIL PROTECTED]> wrote:


I figure I can write this myself easily enough, but I'm wondering if
there's a module already for this task.  I want to run command-line
functions which I know to be non-interactive.  Of course,
POE::Wheel::Run and POE::Component::Child can do this, but their
interfaces are overly complicated for what I need in this
application.  I'm not expecting to need to write anything to the
child process, so rather than incrementally receiving data from
stdout and stderr, I'd rather just defer until the process terminates
and then have a single callback called with all the stdout and all
the stderr and the exit code.  Am I missing a module that does this
already?

Thanks,

-kevin