Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Can't require MCE::Map (Strawberry)?

by Discipulus (Canon)
on Mar 07, 2025 at 09:18 UTC ( [id://11164180]=note: print w/replies, xml ) Need Help??


in reply to Can't require MCE::Map (Strawberry)?

Hello Anonymous Monk (consider registering an account ;),

Unfortunately not a MCE expert, just a big promoter, but generally speaking use X is transalted with require X; import X LIST eventually inside BEGIN to mimicry exatly use

Consider, in StrawberryPerl:

C>perl -we "require MCE::Map; MCE::Map-> init(user_begin => sub {},use +r_end => sub {}); my @a = MCE::Map->run( sub { $_ }, [ 0 .. 9 ]);" # CTRL-C Terminating on signal SIGINT(2) MCE::shutdown: method is not allowed while running at -e line 0. END failed--call queue aborted, <__ANONIO__> line 80992. # LOOK HERE # C>perl -we "require MCE::Map; import MCE::Map; MCE::Map-> init(user_be +gin => sub {},user_end => sub {}); my @a = MCE::Map->run( sub { $_ }, + [ 0 .. 9 ]);" C>

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^2: Can't require MCE::Map (Strawberry)?
by Anonymous Monk on Mar 07, 2025 at 10:29 UTC

    Yeah, thanks. Apparently, MCE::Map::import pre-assigns 'auto' to the CHUNK_SIZE property of a global, and if it's not assigned, then because of line 235, just before 'run', the chunk size is returned/gets undefined (why?) and somehow silently treated as zero (just guessing, didn't debug further), hence infinite loop. I'm now inclined to using the MCE proper anyway, but I think the situation is worth for Mario to have a look at.

      Have you considered filing an actual bug report? Or tagging Mario on this, which will now generate a notification for him?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11164180]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2025-06-14 11:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.