good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: accessor abuse..?by lachoy (Parson) |
on Aug 22, 2002 at 16:56 UTC ( [id://192086]=note: print w/replies, xml ) | Need Help?? |
It's halfway there. Perl has a tradition of using a get/set accessor of the same name versus other language having separate get_foo and set_foo methods. But this is a different matter, since the underlying values are not simple scalars. If you want to keep accessor-only property access, you should use something like:
(Using the index in as a return value for field_exists() is kind of peek-a-boo logic, but it's a start.) Untested because I have something due in a few minutes, but you get the idea :-) Chris
In Section
Seekers of Perl Wisdom
|
|