From: David Kamholz Date: Fri, 18 Nov 2005 17:26:52 +0000 (+0000) Subject: fix PK::Auto bug where it wouldn't recognize a defined but false PK X-Git-Tag: v0.05005~172 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fb184da1e1f083b01b2c071f9f2a59395895d469;p=dbsrgits%2FDBIx-Class.git fix PK::Auto bug where it wouldn't recognize a defined but false PK --- diff --git a/lib/DBIx/Class/PK/Auto.pm b/lib/DBIx/Class/PK/Auto.pm index c2027cc..ac7f3dd 100644 --- a/lib/DBIx/Class/PK/Auto.pm +++ b/lib/DBIx/Class/PK/Auto.pm @@ -35,7 +35,7 @@ sub insert { # if all primaries are already populated, skip auto-inc my $populated = 0; - map { $populated++ if $self->$_ } $self->primary_columns; + map { $populated++ if defined $self->$_ } $self->primary_columns; return $ret if ( $populated == scalar $self->primary_columns ); my ($pri, $too_many) =