Father Chrysostomos <sprout@cpan.org> writes:
> If we do add object attributes to Perl, it would be very nice if we
> could use ‘$obj->attr = $foo’ syntax, instead of $obj->attr($foo),
> which is currently widely used mainly because the former is so hard to
> do (that can change, of course).
This would elegantly solve the semi-religious problem of using
$obj->attr("foo") and $obj->attr
vs
$obj->set_attr("foo") and $obj->get_attr
vs
$obj->SetAttr("foo") and $obj->GetAttr
I think this is where :lvalue was invented for.
-- Johan
Thread Previous
|
Thread Next