From: Marcus Ramberg Date: Mon, 13 Feb 2006 19:59:46 +0000 (+0000) Subject: prepared for release. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dec2517f954b8c6053570a6b5ecf08fbaf1a2bc2;p=dbsrgits%2FDBIx-Class-Historic.git prepared for release. --- diff --git a/Changes b/Changes index 183046b..1fd06ee 100644 --- a/Changes +++ b/Changes @@ -1,8 +1,11 @@ Revision history for DBIx::Class +0.05004 2006-02-13 20:59:00 - allow specification of related columns via cols attr when primary + - Fix count for group_by as scalar keys of the related table are not fetched - add horrific fix to make Oracle's retarded limit syntax work + - Remove Carp require 0.05003 2006-02-08 17:50:20 - add component_class accessors and use them for *_class diff --git a/lib/DBIx/Class.pm b/lib/DBIx/Class.pm index 9707a9d..4255db6 100644 --- a/lib/DBIx/Class.pm +++ b/lib/DBIx/Class.pm @@ -13,7 +13,7 @@ sub component_base_class { 'DBIx::Class' } # i.e. first release of 0.XX *must* be 0.XX000. This avoids fBSD ports # brain damage and presumably various other packaging systems too -$VERSION = '0.05003'; +$VERSION = '0.05004'; sub MODIFY_CODE_ATTRIBUTES { my ($class,$code,@attrs) = @_; diff --git a/lib/DBIx/Class/AccessorGroup.pm b/lib/DBIx/Class/AccessorGroup.pm index 4e42b27..dd99da3 100644 --- a/lib/DBIx/Class/AccessorGroup.pm +++ b/lib/DBIx/Class/AccessorGroup.pm @@ -122,7 +122,6 @@ sub make_group_wo_accessor { unless (@_) { my $caller = caller; - require Carp; croak("'$caller' cannot access the value of '$field' on ". "objects of class '$class'"); } diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index dce4ad5..4ee659e 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -394,7 +394,7 @@ sub count { my $group_by; my $select = { 'count' => '*' }; if( $group_by = delete $self->{attrs}{group_by} ) { - my @distinct = @$group_by; + my @distinct = (ref $group_by ? @$group_by : ($group_by)); # todo: try CONCAT for multi-column pk my @pk = $self->result_source->primary_columns; if( scalar(@pk) == 1 ) { diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index e42b013..f643441 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -336,6 +336,7 @@ sub _execute { $self->debugfh->print("$sql: @debug_bind\n"); } my $sth = $self->sth($sql,$op); + croak "no sth generated via sql: $sql" unless $sth; @bind = map { ref $_ ? ''.$_ : $_ } @bind; # stringify args my $rv; if ($sth) {