You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2014/07/06 19:21:32 UTC

git commit: refs/heads/master - Move 'inherit_metadata' hack to CFC

Repository: lucy
Updated Branches:
  refs/heads/master b1975f5d1 -> aa9445674


Move 'inherit_metadata' hack to CFC

Note: Now that the Dump/Load mechanism was moved from Clownfish to Lucy
and Clownfish doesn't define method aliases any more, the cross-parcel
metadata hack isn't strictly needed. The missing information about
excluded host methods doesn't seem to cause problems either. It's still
a good idea keep it.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/aa944567
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/aa944567
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/aa944567

Branch: refs/heads/master
Commit: aa9445674fa3640702a8a6eb03843f3fc0fe04fc
Parents: b1975f5
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sun Jul 6 19:07:51 2014 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sun Jul 6 19:19:14 2014 +0200

----------------------------------------------------------------------
 perl/buildlib/Lucy/Build/Binding/Misc.pm | 30 +++------------------------
 1 file changed, 3 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/aa944567/perl/buildlib/Lucy/Build/Binding/Misc.pm
----------------------------------------------------------------------
diff --git a/perl/buildlib/Lucy/Build/Binding/Misc.pm b/perl/buildlib/Lucy/Build/Binding/Misc.pm
index 427aa4f..0e7a73f 100644
--- a/perl/buildlib/Lucy/Build/Binding/Misc.pm
+++ b/perl/buildlib/Lucy/Build/Binding/Misc.pm
@@ -21,36 +21,12 @@ $VERSION = eval $VERSION;
 
 sub bind_all {
     my ($class, $hierarchy) = @_;
-    $class->inherit_metadata($hierarchy);
-    $class->bind_lucy;
-    $class->bind_test;
-}
-
-sub inherit_metadata {
-    my ($class, $hierarchy) = @_;
 
     require Clownfish;
+    $hierarchy->inherit_metadata;
 
-    for my $class (@{ $hierarchy->ordered_classes }) {
-        next if $class->get_parcel->get_name ne 'Clownfish' || $class->inert;
-
-        my $class_name = $class->get_class_name;
-        my $rt_class   = Clownfish::Class->fetch_class($class_name);
-
-        for my $rt_method (@{ $rt_class->get_methods }) {
-            if ($rt_method->is_excluded_from_host) {
-                my $method = $class->method($rt_method->get_name);
-                $method->exclude_from_host;
-            }
-            else {
-                my $alias = $rt_method->get_host_alias;
-                if (defined($alias)) {
-                    my $method = $class->method($rt_method->get_name);
-                    $method->set_host_alias($alias);
-                }
-            }
-        }
-    }
+    $class->bind_lucy;
+    $class->bind_test;
 }
 
 sub bind_lucy {