in reply to Re^2: Are lvalue methods (as properties) a good idea?
in thread Are lvalue methods (as properties) a good idea?
Wow. That's one heck of a lot of overhead to support syntactic sugar :) When you have to make the sub a closure and tie it to a custom class to provide validation for lvalue attributes, I'm at a loss to see how this is preferable to:
sub bar { my ($self, $bar) = @_; croak "bar() requires a hashref" unless 'HASH' eq ref $bar; $self->{bar} = $bar; return $self; }
Cheers,
Ovid
New address of my CGI Course.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Are lvalue methods (as properties) a good idea?
by BrowserUk (Patriarch) on Jan 13, 2005 at 00:27 UTC | |
by jplindstrom (Monsignor) on Jan 13, 2005 at 13:55 UTC | |
by BrowserUk (Patriarch) on Jan 13, 2005 at 18:13 UTC | |
Re^4: Are lvalue methods (as properties) a good idea?
by Tanktalus (Canon) on Jan 13, 2005 at 00:16 UTC | |
Re^4: Are lvalue methods (as properties) a good idea?
by Aristotle (Chancellor) on Jan 14, 2005 at 08:47 UTC |