Re: [PATCH] population bug in create()?

[prev] [thread] [next] [Date index for 2004/10/19]

From: Tony Bowden
Subject: Re: [PATCH] population bug in create()?
Date: 11:31 on 19 Oct 2004
On Tue, Oct 19, 2004 at 05:24:21PM +0900, Tatsuhiko Miyagawa wrote:
> 519:   if (@primary_columns == grep defined, @{$data}{@primary_columns})
> grep defined, @{$data}{qw(id)} automatically populates id => undef on
> $data hashref. So here's a patch.
> 
> - if (@primary_columns == grep defined, @{$data}{@primary_columns}) {
> + my $num = 0;
> + for my $pk (@primary_columns) {
> +     $num++ if defined $data->{$pk};
> + }
> + if (@primary_columns == $num) {

Ouch.

I'm curious if there isn't a better way here, though...

Thanks,

Tony

[PATCH] population bug in create()?
Tatsuhiko Miyagawa 08:24 on 19 Oct 2004

Re: [PATCH] population bug in create()?
Tony Bowden 11:31 on 19 Oct 2004

Re: [PATCH] population bug in create()?
Tim Bunce 14:06 on 19 Oct 2004

Re: [PATCH] population bug in create()?
William McKee 13:26 on 20 Oct 2004

Re: [PATCH] population bug in create()?
Ricardo SIGNES 17:35 on 20 Oct 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52