[LA.pm] Parallel::Simple
Kevin Scaldeferri
kevin+lapm at scaldeferri.com
Sun Feb 27 14:21:16 PST 2005
On Feb 27, 2005, at 1:21 PM, Ofer Nave wrote:
>
>> You probably ought to initialize $error and $return_values. Otherwise
>> you might have some problems if someone did something odd like
>> run()ing
>
> No reason to. I would only initiliaze them to undef to signify that
> they
> have not yet been defined, but perl does this to new variables
> automatically.
>
Won't errplus() fail trying to dereference an undef value? Also, with
warnings on, it could complain about interpolating $error if it is
undef.
Actually, looking more closely at this, I notice that $return_values is
sometimes a hash ref and sometimes an array ref. I think that this is
probably a bad idea, and it also makes it unclear just what you would
initialize it to.
-kevin
More information about the Losangeles-pm
mailing list