From: Peter Rabbitson Date: Sun, 31 Jan 2010 10:07:25 +0000 (+0000) Subject: Stupid errors X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a83cdbf22f334fddea92a3c52e068b755e30265a;p=dbsrgits%2FDBIx-Class-Historic.git Stupid errors --- diff --git a/lib/DBIx/Class/Ordered.pm b/lib/DBIx/Class/Ordered.pm index 409159e..2cac812 100644 --- a/lib/DBIx/Class/Ordered.pm +++ b/lib/DBIx/Class/Ordered.pm @@ -801,7 +801,7 @@ sub _shift_siblings { my $cursor = $shift_rs->search ({}, { order_by => { "-$ord", $position_column }, columns => \@pcols } )->cursor; my $rs = $self->result_source->resultset; - my @all_pks = $cusrsor->all; + my @all_pks = $cursor->all; while (my $pks = shift @all_pks) { my $cond; for my $i (0.. $#pcols) { diff --git a/lib/DBIx/Class/Relationship/HasOne.pm b/lib/DBIx/Class/Relationship/HasOne.pm index 4dd97bd..9be220b 100644 --- a/lib/DBIx/Class/Relationship/HasOne.pm +++ b/lib/DBIx/Class/Relationship/HasOne.pm @@ -62,7 +62,7 @@ sub _get_primary_key { $target_class ||= $class; my ($pri, $too_many) = eval { $target_class->_pri_cols }; $class->throw_exception( - "Can't infer join condition for ${rel} on ${target_class}: $@" + "Can't infer join condition on ${target_class}: $@" ) if $@; $class->throw_exception( diff --git a/lib/DBIx/Class/ResultSourceProxy.pm b/lib/DBIx/Class/ResultSourceProxy.pm index ffef623..6df208e 100644 --- a/lib/DBIx/Class/ResultSourceProxy.pm +++ b/lib/DBIx/Class/ResultSourceProxy.pm @@ -75,6 +75,10 @@ sub primary_columns { shift->result_source_instance->primary_columns(@_); } +sub _pri_cols { + shift->result_source_instance->_pri_cols(@_); +} + sub add_unique_constraint { shift->result_source_instance->add_unique_constraint(@_); }