X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FLoader%2FRelBuilder%2FCompat%2Fv0_05.pm;h=9f11a946833f420e1e4a59e98dce568185ae91ff;hb=ef73d2ade02190ee6e89138aa52d19f7138272b1;hp=de0cfc5907120c19f07e5a2300d9acec6466c7ca;hpb=c4a69b87bd3d3fdda08f05d363311a6e9d3fc0f7;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_05.pm b/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_05.pm index de0cfc5..9f11a94 100644 --- a/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_05.pm +++ b/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_05.pm @@ -4,9 +4,11 @@ use strict; use warnings; use base 'DBIx::Class::Schema::Loader::RelBuilder::Compat::v0_06'; use mro 'c3'; +use DBIx::Class::Schema::Loader::Utils 'array_eq'; +use namespace::clean; use Lingua::EN::Inflect::Number (); -our $VERSION = '0.07010'; +our $VERSION = '0.07027'; sub _to_PL { my ($self, $name) = @_; @@ -53,8 +55,8 @@ sub _relnames_and_method { # If the local columns have a UNIQUE constraint, this is a one-to-one rel my $local_source = $self->{schema}->source($local_moniker); - if ($self->_array_eq([ $local_source->primary_columns ], $local_cols) || - grep { $self->_array_eq($_->[1], $local_cols) } @$uniqs) { + if (array_eq([ $local_source->primary_columns ], $local_cols) || + grep { array_eq($_->[1], $local_cols) } @$uniqs) { $remote_method = 'might_have'; ($local_relname) = $self->_inflect_singular($local_relname_uninflected); }