- Fix tests when the path to perl has spaces in it (GH#19)
- Inline String::CamelCase::wordsplit() due to RT#123030
- Get enum values from DBD::Pg if it's new enough
+ - Remove dependency on DBIx::Class::IntrospectableM2M
0.07048_01 - 2018-02-23
- Convert from Module::Install to ExtUtils::MakeMaker + Distar (GH#17)
'Test::Warn' => '0.21',
'Test::Deep' => '0.107',
'Test::Differences' => '0.60',
- # temporary, needs to be thrown out
- 'DBIx::Class::IntrospectableM2M' => 0,
# core, but specific versions not available on older perls
'File::Temp' => '0.16',
'File::Path' => '2.07',
--- /dev/null
+package IntrospectM2M;
+
+use strict;
+use warnings;
+use base 'DBIx::Class';
+
+__PACKAGE__->mk_classdata( _m2m_metadata => {} );
+
+sub many_to_many {
+ my $class = shift;
+ my ($meth_name, $link, $far_side) = @_;
+ my $store = $class->_m2m_metadata;
+ die "You are overwritting another relationship's metadata"
+ if exists $store->{$meth_name};
+
+ my $attrs = {
+ accessor => $meth_name,
+ relation => $link, #"link" table or immediate relation
+ foreign_relation => $far_side, #'far' table or foreign relation
+ (@_ > 3 ? (attrs => $_[3]) : ()), #only store if exist
+ };
+
+ #inheritable data workaround
+ $class->_m2m_metadata({ $meth_name => $attrs, %$store});
+ $class->next::method(@_);
+}
+
+1;
additional_classes => 'TestAdditional',
additional_base_classes => 'TestAdditionalBase',
left_base_classes => [ qw/TestLeftBase/ ],
- components => [ qw/TestComponent +TestComponentFQN IntrospectableM2M/ ],
+ components => [ qw/TestComponent +TestComponentFQN +IntrospectM2M/ ],
inflect_plural => { loader_test4_fkid => 'loader_test4zes' },
inflect_singular => { fkid => 'fkid_singular' },
moniker_map => \&_monikerize,