On Tue, Mar 01, 2005 at 02:40:36PM -0800, Ofer Nave wrote:
> 
> # getting fancy with arg binding
> my @hosts = qw( foo bar baz );
> prun( map { my $host = $_; sub { test_host( $host ) } } @hosts )
>   or die( Parallel::Simple::errplus() );

I think this is simpler, because I can guess what it does without
reading more documentation. 

My idea of simple here is clarifying the call some:

 my @host_tests;
 for qw( foo bar baz ) {
     push @host_tests, sub { test_host( $_ ) };
 }
 prun (@host_tests) or die( Parallel::Simple::errplus() );


It's not clear your code refs would interact with arguments that may
already be passed into them, before they get to prun().

It's also not 'normal' to mix hash and list calling styles, or to use a
code ref for a hash key. 

In summary, I don't think the suggested addition would be 'simple'.

    Mark

-- 
http://mark.stosberg.com/ 

Reply via email to