From: Rafael Kitover Date: Mon, 29 Jun 2009 21:13:48 +0000 (+0000) Subject: fix t/80unique.t X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3e6c11313817277934f18db88f85f0a7233386c1;p=dbsrgits%2FDBIx-Class-Historic.git fix t/80unique.t --- diff --git a/lib/DBIx/Class/ResultSource.pm b/lib/DBIx/Class/ResultSource.pm index d6fd004..b3179f7 100644 --- a/lib/DBIx/Class/ResultSource.pm +++ b/lib/DBIx/Class/ResultSource.pm @@ -484,7 +484,10 @@ optional constraint name. sub name_unique_constraint { my ($self, $cols) = @_; - return join '_', $self->name, @$cols; + my $name = $self->name; + $name = $$name if ref $name; + + return join '_', $name, @$cols; } =head2 unique_constraints