use Class::Unload;
use Class::Inspector ();
use Scalar::Util 'looks_like_number';
-use DBIx::Class::Schema::Loader::Utils qw/split_name dumper_squashed eval_package_without_redefine_warnings class_path slurp_file sigwarn_silencer/;
+use DBIx::Class::Schema::Loader::Utils qw/split_name dumper_squashed eval_package_without_redefine_warnings class_path slurp_file sigwarn_silencer firstidx uniq/;
use DBIx::Class::Schema::Loader::Optional::Dependencies ();
use Try::Tiny;
use DBIx::Class ();
use Encode qw/encode decode/;
-use List::MoreUtils qw/all any firstidx uniq/;
+use List::Util qw/all any none/;
use File::Temp 'tempfile';
use namespace::clean;
moniker_to_table
uniq_to_primary
quiet
+ allow_extra_m2m_cols
/);
on tables to primary keys, assuming there is only one largest unique
constraint.
+=head2 allow_extra_m2m_cols
+
+Generate C<many_to_many> relationship bridges even if the link table has
+extra columns other than the foreign keys. The primary key must still
+equal the union of the foreign keys.
+
+
=head2 filter_generated_code
An optional hook that lets you filter the generated text for various classes
if (ref $self->moniker_parts ne 'ARRAY') {
croak 'moniker_parts must be an arrayref';
}
- if ((firstidx { $_ eq 'name' } @{ $self->moniker_parts }) == -1) {
+ if (none { $_ eq 'name' } @{ $self->moniker_parts }) {
croak "moniker_parts option *must* contain 'name'";
}
}