[Bast-commits] r7482 - DBIx-Class/0.08/trunk/lib/DBIx/Class
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Wed Sep 2 09:31:50 GMT 2009
Author: ribasushi
Date: 2009-09-02 09:31:50 +0000 (Wed, 02 Sep 2009)
New Revision: 7482
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
Log:
Some cleanup... don't remember where it came from
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm 2009-09-02 09:20:25 UTC (rev 7481)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm 2009-09-02 09:31:50 UTC (rev 7482)
@@ -2853,7 +2853,7 @@
if ( $attrs->{join} || $attrs->{prefetch} ) {
- $self->throw_exception ('join/prefetch can not be used with a literal scalarref {from}')
+ $self->throw_exception ('join/prefetch can not be used with a custom {from}')
if ref $attrs->{from} ne 'ARRAY';
my $join = delete $attrs->{join} || {};
@@ -2999,6 +2999,13 @@
sub _calculate_score {
my ($self, $a, $b) = @_;
+ if (defined $a xor defined $b) {
+ return 0;
+ }
+ elsif (not defined $a) {
+ return 1;
+ }
+
if (ref $b eq 'HASH') {
my ($b_key) = keys %{$b};
if (ref $a eq 'HASH') {
More information about the Bast-commits
mailing list