X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FResultSource.pm;h=55e99ad4ae8690dbcc2abe17581b218740f25fcf;hb=35f61d278b515761c2dc3ac94059724a74e29793;hp=3b318a44b01daf13a94b009def6c90aeba851115;hpb=35c77aa30e6a2b21a81b945adbbbb9599d6828fa;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/ResultSource.pm b/lib/DBIx/Class/ResultSource.pm index 3b318a4..55e99ad 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 @@ -981,7 +984,7 @@ opposing a C relation. For definition of these look in L. The returned hashref is keyed by the name of the opposing -relationship, and contains it's data in the same manner as +relationship, and contains its data in the same manner as L. =cut