in reply to Re^5: Method Chaining and Accessors
in thread Method Chaining and Accessors
Personally, I think that get_foo is the cleaner of the two,You have an odd notion of what's "clean", though of course you do have a point that any change in standard practice has potential to cause confusion.
The thing with me is I can't remember any case where I've just guessed what accessor I should be using, because there isn't any way to intuit the name of the attribute itself -- it always comes out of the documentation, half of the time it comes straight out of the SYNOPSIS.
Since $self->{attribute} is wrong it should look wrong.Well, different things should look different, right? Which is why I think "get_*" and "set_*" methods look too similar.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Method Chaining and Accessors
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 |