On Tue, 6 Feb 2007 13:19:37 -0500 "John Siracusa" <[EMAIL PROTECTED]> wrote:
JS> After doing that, you could set prices to undef to cause the JS> collection to be re-fetched from the database on the next access: JS> my($price) = grep { $_->region eq 'UK' } $p->prices; JS> $price->delete; JS> $p->prices(undef); # forget previously fetched collection JS> @prices = $p->prices; # collection no longer contains deleted entry What always annoyed me about this technique is that it looks like you're losing all the prices. Setting something to undef generally has that meaning in Perl. I would rather write $p->forget_prices(); or something like it (the same effect could be achieved behind the scenes). This should definitely not be a helper function, if it's used, because the whole point is that the default semantics should not be confusing to new users. Perhaps I'm the only one of this opinion. Ted ------------------------------------------------------------------------- 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&kid=120709&bid=263057&dat=121642 _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object