Commit | Line | Data |
---|---|---|
8973b6f1 | 1 | package DBIx::Class::Relationship::ManyToMany; |
2 | ||
3 | use strict; | |
4 | use warnings; | |
5 | ||
6 | sub many_to_many { | |
7 | my ($class, $meth, $rel_class, $f_class) = @_; | |
8 | ||
9 | eval "require $f_class"; | |
10 | ||
11 | { | |
12 | no strict 'refs'; | |
13 | no warnings 'redefine'; | |
14 | *{"${class}::${meth}"} = | |
15 | sub { shift->search_related($rel_class)->search_related($f_class, @_); }; | |
16 | } | |
17 | } | |
18 | ||
19 | 1; |