<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">package DBIx::Class::Schema::Loader::RelBuilder::Compat::v0_040;

use strict;
use warnings;
use base 'DBIx::Class::Schema::Loader::RelBuilder::Compat::v0_05';
use mro 'c3';

our $VERSION = '0.07035';

sub _relnames_and_method {
    my ( $self, $local_moniker, $rel, $cond, $uniqs, $counters ) = @_;

    my $remote_moniker = $rel-&gt;{remote_source};
    my $remote_table   = $rel-&gt;{remote_table};

    my $local_table = $rel-&gt;{local_table};
    my $local_cols  = $rel-&gt;{local_columns};

    # for single-column case, set the remote relname to just the column name
    my ($remote_relname) =
        scalar keys %{$cond} == 1
            ? $self-&gt;_inflect_singular( values %$cond  )
            : $self-&gt;_inflect_singular( lc $remote_table );

    # If more than one rel between this pair of tables, use the local
    # col names to distinguish
    my $local_relname;
    if ($counters-&gt;{$remote_moniker} &gt; 1) {
        my $colnames = '_' . join( '_', @$local_cols );
        $remote_relname .= $colnames if keys %$cond &gt; 1;
        ($local_relname) = $self-&gt;_inflect_plural( lc($local_table) . $colnames );
    } else {
        ($local_relname) = $self-&gt;_inflect_plural(lc $local_table);
    }

    return ( $local_relname, $remote_relname, 'has_many' );
}

sub _remote_attrs { }

=head1 NAME

DBIx::Class::Schema::Loader::RelBuilder::Compat::v0_040 - RelBuilder for
compatibility with DBIx::Class::Schema::Loader version 0.04006

=head1 DESCRIPTION

See L&lt;DBIx::Class::Schema::Loader::Base/naming&gt; and
L&lt;DBIx::Class::Schema::Loader::RelBuilder&gt;.

=head1 AUTHOR

See L&lt;DBIx::Class::Schema::Loader/AUTHOR&gt; and L&lt;DBIx::Class::Schema::Loader/CONTRIBUTORS&gt;.

=head1 LICENSE

This library is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.

=cut

1;
</pre></body></html>