]> git.decadent.org.uk Git - maypole.git/commitdiff
related() patch from Marcus.
authorSimon Cozens <simon@simon-cozens.org>
Sat, 22 May 2004 20:08:45 +0000 (20:08 +0000)
committerSimon Cozens <simon@simon-cozens.org>
Sat, 22 May 2004 20:08:45 +0000 (20:08 +0000)
git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@144 48953598-375a-da11-a14b-00016c27c3ee

Makefile.PL
lib/Maypole/Model/CDBI.pm

index 18b21ca91a09ae04cd96e19c2b2ebb7762080fa1..cd0fd96f558bbdef1b5519d67ce2174d93e02451 100644 (file)
@@ -13,6 +13,7 @@ WriteMakefile(
         Class::DBI::AsForm => 0,
         Class::DBI::FromCGI => 0,
         Class::DBI::Loader::Relationship => 0,
+       Class::DBI => 0.96,
         CGI::Untaint => 0,
         UNIVERSAL::moniker => 0,
         UNIVERSAL::require => 0,
index 71e1a49f69e9a3457c8434112ce0776a490bda90..cbecaf1bebf82e2adf1b5d5891b938e10ac7e9ea 100644 (file)
@@ -26,12 +26,7 @@ modules.
 
 sub related {
     my ($self, $r) = @_;
-
-    # Has-many methods; XXX this is a hack
-    map {to_PL($_)} 
-    grep { exists $r->{config}{ok_tables}{$_} }
-    map {$_->table}
-    keys %{shift->__hasa_list || {}}
+    return keys %{$self->meta_info('has_many') || {}};
 }
 
 sub do_edit :Exported {