in reply to Re^4: Method Chaining and Accessors
in thread Method Chaining and Accessors
I suggest that your carping still counts as a surprise and Personally, I think that get_foo is the cleaner of the two, but whatever floats your boat (or the boat of the person that writes your coding standards)
Since $self->{attribute} is wrong it should look wrong. If it doesn't stand out as being, people may not spot it, or worse still, end up "fixing" the $self->get_attribute;
And as for "Not if you don't have any mutators, they don't.". It gets a little tricky when you use someone else's cpan module that still uses mutators? *bam* you've got your getters, and their mutators, and there's arms legs and butts in all sorts of disorder!
As an interesting development, kyle has just the thing to allow you to port to an insideout object system at Make an inside-out object look hash-based using overload.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Method Chaining and Accessors
by doom (Deacon) on Apr 12, 2007 at 16:14 UTC | |
by f00li5h (Chaplain) on Apr 12, 2007 at 17:07 UTC | |
by doom (Deacon) on Apr 13, 2007 at 19:23 UTC | |
by chromatic (Archbishop) on Apr 14, 2007 at 07:38 UTC | |
by doom (Deacon) on Apr 14, 2007 at 08:08 UTC | |
by f00li5h (Chaplain) on Apr 14, 2007 at 03:31 UTC |