[CDBI] Best way to do this
[prev]
[thread]
[next]
[Date index for 2005/09/10]
I am attempting to do something that ought to be easy, but I can't quite
figure out the best approach.
BOB->has_many('friends'...);
But I'd like to put a little custom logic into BOB->friend, such as:
sub friends{
my $self = shift;
my $friends = $self->SUPER::friends(@_);
if (@friends ==1 && !wantarray){
return shift @friends;
}
...
}
Of course HasMany complains about already having friends defined. I can
certainly work around this, and I might anyway - but what's a good way to
solve the general case of doing some post-processing on the data?
_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi
|
[CDBI] Best way to do this
Kate Yoak 03:27 on 10 Sep 2005
|