Doug Greer (Tue 06/23/09 15:43):
> Hey all,
> 
> I'm new to POE.  I'd like to convert a script using
> Proc::Queue<http://search.cpan.org/%7Esalva/Proc-Queue-1.23/lib/Proc/Queue.pm>to
> use the
> PoCo::JobQueue<http://search.cpan.org/%7Ercaputo/POE-Component-JobQueue-0.55/JobQueue.pm>to
> iterate through a list of devices (routers), running about 5
> concurrently.
> 
> I haven't been able to take the example code from the Synopsis section and
> make a working example.
> 
> Does anyone have a working example?  If not, I'll continue trying to get my
> example code working and send it to this list when I think I'm getting
> close.

Hi Doug,

For this type of thing I always start with "Child Processes 3" in the 
Cookbook as a template 
(http://poe.perl.org/?POE_Cookbook/Child_Processes_3).  All you need to
do really is modify do_stuff() to perform the essential logic of your
existing script, handle the output appropriately, etc.  Pretty 
straightforward as long as your requirments aren't too complex. Since
the example is a complete script you can also observe how the parts 
interact before diving in.

Zach

Reply via email to