Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: List::MoreUtils and require

by ioannis (Prior)
on Jun 27, 2006 at 23:41 UTC ( #557899=note: print w/replies, xml ) Need Help??


in reply to List::MoreUtils and require

The require loads the module at runtime, yet you were trying to reference one of its functions before INIT. Here is one solution:
use warnings; my @v1 = qw(4 0 0 3); my @v2 = qw(4 0 0 3); INIT { require List::MoreUtils; my $ea = List::MoreUtils::each_array(@v1, @v2); while (my ($v, $t) = $ea->()) { } }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://557899]
help
Chatterbox?
[marioroy]: CORE::wait works well eventhough multiple instances or classes using Hobo::Manager.
[Corion]: marioroy: I'm not sure what the normal use for the PID is in P:FM, but I guess that most programs just ignore or log it
[Corion]: Oh, yes, programs could call wait $pid, but if your $pid is an object, then you could add a ->wait method to it and wait $pid would call that automatically "thanks" to indirect object notation
[marioroy]: Just documentation edits is all that remains. Hobo::Simple provides foreach and forseq with identifier capability -- all transparently supporting array, hash, file handle, and seq 1 .. N.
[marioroy]: Corion Regarding PID, that's great. So will leave it so compatible with MCE::Hobo. e.g. ->create returns a Hobo object. Folks can get ->pid from it. So, that's not a problem.
[choroba]: ad readdir: 5.12 needed
[marioroy]: CORE::wait can block if another process reaps a worker from another class. MCE::Hobo takes care of that and transparently.
[Discipulus]: thanks choroba i'll update my answer
[Lady_Aleena]: Hello Discipulus, Corion, choroba, and marioroy...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2017-05-26 08:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?