in reply to Are lvalue methods (as properties) a good idea?
I'm not too fond of them. Currently, there is no clean way to validate the value:
$object->digits = [qw/finger finger thumb/]; # whoops!One can use Attribute::Property for that, but then you're relying on a attributes and those rely on CHECK blocks and CHECK blocks don't run under all environments (mod_perl, for example). So if you want to use lvalues, feel free, but just be leery of using them in code that you distribute to others as they are rather fragile.
Cheers,
Ovid
New address of my CGI Course.
|
---|