On 5/18/06, Ted Zlatanov <[EMAIL PROTECTED]> wrote:
On 10 May 2006, [EMAIL PROTECTED] wrote:
* Return a reference to an array of added objects
* Return the first added object.
> Hm, I'm not sure I like those much either. What I'm worried about is this:
$widget = $o->add_widgets($some_widget);
The only way that works is if add_widgets() returns the first added object
when called in scalar context. But that's a pretty odd behavior. Opinions?
Since it's add_widgets, plural, I would vote for returning the widgets
added as an array ref.
Also too late. I waffled on this a bit, but finally decided to just
return @objects, which ends up as a count in scalar context.
Returning an arrayref is an efficiency for when there are many values.
But I figured that if anyone is adding a huge number of objects,
they'll already have them in a local array somewhere and won't need
the return value at all.
-John
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object