I'm reviewing parts of the API and I have second thoughts about this return-the-prev-value-on-set feature. While it's nice and perlish, it's not always efficient. If the user doesn't care what was the previous value and just wants to set a new value, we shouldn't enforce on her the overhead of making another call to get the previous vallue. In certain cases it can be quite expensive. Granted we could have exempted those cases, but then we will have an inconsistent API. In the core perl it doesn't cost much to return the previously set value, since it's readily available and doesn't require special code.

So I propose that we return nothing on $socket->opt_set() call and adjust other APIs and devise new ones using this guideline.

What do you think?

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to