I assume you meant that :lvalue() takes a parameter list.  Either a
singleton named variable $, @, or %. 

Or If it makes sense even a more complex parameter list could be
demanded.

sub foo :lvalue(Dog $fido, int @array, %hash) {}

foo() = ($name, 0..10, %bar);

<chaim>

>>>>> "BB" == Buddha Buck <[EMAIL PROTECTED]> writes:

BB> sub foo : lvalue($newval) {
BB>   # $newval is a lexical scaler in this block, initialised with a 
BB> reference
BB>   # to the value to be assigned to $self{foo}
BB>   my $self = shift;
BB>   return $self{foo} unless defined $newval; # rvalue context
BB>   # lvalue context
BB>   # verify new foo is in correct range
BB>   return $self{foo} if $$newval < $MINFOO;
BB>   return $self{foo} if $$newval > $MAXFOO;



-- 
Chaim Frenkel                                        Nonlinear Knowledge, Inc.
[EMAIL PROTECTED]                                               +1-718-236-0183

Reply via email to