aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgroditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2008-11-08 19:25:01 +0000
committergroditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2008-11-08 19:25:01 +0000
commite4f841e00752c41d5caca27f865c22aa2dd3cd5c (patch)
tree13e128164898dcbb57ba672df25746cb57db593d
parentad1a3f4031eaaa9ac4c675d6ad16a2172f9f4705 (diff)
downloadreaction-e4f841e00752c41d5caca27f865c22aa2dd3cd5c.tar.gz
reaction-e4f841e00752c41d5caca27f865c22aa2dd3cd5c.zip
removed IntrospectableM2M and added a dep to it now that it's a separate dist
-rw-r--r--Makefile.PL1
-rw-r--r--lib/DBIx/Class/IntrospectableM2M.pm35
2 files changed, 1 insertions, 35 deletions
diff --git a/Makefile.PL b/Makefile.PL
index 8ea5e17..282fd1d 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -19,6 +19,7 @@ requires 'Config::General' => 0;
requires 'Test::Class' => 0;
requires 'Test::Memory::Cycle' => 0;
requires 'DBIx::Class' => '0.07001';
+requires 'DBIx::Class::IntrospectableM2M' => '0.001000';
requires 'SQL::Translator' => '0.08';
requires 'Moose' => '0.58';
requires 'aliased' => 0;
diff --git a/lib/DBIx/Class/IntrospectableM2M.pm b/lib/DBIx/Class/IntrospectableM2M.pm
deleted file mode 100644
index e3a921e..0000000
--- a/lib/DBIx/Class/IntrospectableM2M.pm
+++ /dev/null
@@ -1,35 +0,0 @@
-package DBIx::Class::IntrospectableM2M;
-
-use strict;
-use warnings;
-use base 'DBIx::Class';
-
-#namespace pollution. sadface.
-__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 imediate relation
- foreign_relation => $far_side, #'far' table or foreign relation
- (@_ > 3 ? (attrs => $_[3]) : ()), #only store if exist
- rs_method => "${meth_name}_rs", #for completeness..
- add_method => "add_to_${meth_name}",
- set_method => "set_${meth_name}",
- remove_method => "remove_from_${meth_name}",
- };
-
- #inheritable data workaround/
- $class->_m2m_metadata({ $meth_name => $attrs, %$store});
-
- $class->next::method(@_);
-}
-
-1;