Nathan Wiger <[EMAIL PROTECTED]> writes:

>    $cgi->param($var) = @val;
>    $cgi->param($var, @val);

You can do that easily:

  sub param {
    my ($self, @rest) = @_;
    $self->{aval} = @rest if @rest;     # See note
    lreturn $self->{aval};
  }

Note that no assignment in line "# See note" will take place if the
method is called without additional parameters.

My point is that a call like "$cgi->param($var) = @val" may not be
considered mere syntactic sugar for "$cgi->param($var, @val)". It is
much more.

-- Johan

Reply via email to