Re: Properties as hash keys, damn perl is cool!



* muppet <scott asofyet org> [2003-10-31 05:25]:
that said, i don't think it's a great idea, because it's a 
fundamental deviation from the API.

but, for the record, i find that sort of AUTOLOAD to be rather
obnoxious in that it makes the error messages you get when you
misspell a method name be non-standard, possibly non-sensical.

i have always despised this VB-esq way of doing things.  i much
prefer setters that return the replaced value, so you can
restore it later.

Don't confuse my arguing in favour of this style with arguing in
favour of this style. :-)

I was actually arguing against the hash key approach; *if* you
want simpler access, then IMHO you should go via setter/getter
methods. Using the object hashref is naughty and dirty and not
something I'd like to see promoted.

Personally, I don't see what's wrong with taking the regular API
route.

-- 
Regards,
Aristotle
 
"If you can't laugh at yourself, you don't take life seriously enough."



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]