Okay, so we've got these guys auto-created if we want:
method foo is lvalue { return $.foo }
(plus or minus the syntax) which lets us do:
$obj.foo = 5;
print $obj.foo;
So, what about simple array accessors?
$obj.colors('red', 'green', 'blue');
$obj.colors = ('red',
John Siracusa:
# Okay, so we've got these guys auto-created if we want:
#
# method foo is lvalue { return $.foo }
#
# (plus or minus the syntax) which lets us do:
#
# $obj.foo = 5;
# print $obj.foo;
#
# So, what about simple array accessors?
Please note that these are my best
On 10/30/01 12:13 PM, Brent Dax wrote:
John Siracusa:
Please note that these are my best guesses; I'm not a Damian ;^).
# $obj.colors('red', 'green', 'blue');
#
# $obj.colors = ('red', 'green', 'blue');
#
# $obj.colors = ['red', 'green', 'blue' ];
$obj.colors=('red',