lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject git commit: refs/heads/master - Move 'inherit_metadata' hack to CFC
Date Sun, 06 Jul 2014 17:21:32 GMT
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 <wellnhofer@aevum.de>
Authored: Sun Jul 6 19:07:51 2014 +0200
Committer: Nick Wellnhofer <wellnhofer@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 {


Mime
View raw message