Richard Boulton <[EMAIL PROTECTED]> writes:
> On Wed, Jun 13, 2001 at 11:44:52AM +0300, Kalle Olavi Niemitalo wrote:
>> This bug is also causing the @TRUE@ conditions reported by
>> Richard Boulton in "Bug with conditionals. [PATCH]".
> 
> You're right, this does seem to be the main cause of the problem I
> reported.
>
> I tried fixing the problem (by passing by reference instead).
[snip]
>  # $BOOLEAN
> -# &conditionals_true_when (@CONDS, @WHENS)
>+# &conditionals_true_when (\@CONDS, \@WHENS)
>  # ----------------------------------------
[snip]
>+sub conditionals_true_when ($$)
>  {
> -    my (@conds, @whens) = @_;
>+    my ($condsref, $whensref) = @_;

Isn't it cleaner to use 

  sub conditions_true_when(\@@)
  {
    my ($condsref, @whens) = @_;

You also get the benefit of type-checking.

> -       if ! conditionals_true_when ((@parent_conds), ($vcond));
>+        if ! conditionals_true_when ([@parent_conds], [$vcond]);

This would then be,

  if ! conditionals_true_when(@parent_conds, $vcond)

- Hari
-- 
Raja R Harinath ------------------------------ [EMAIL PROTECTED]
"When all else fails, read the instructions."      -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing."   -- Roy L Ash

Reply via email to