You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2012/02/15 06:13:22 UTC

[lucy-commits] svn commit: r1244363 - in /incubator/lucy/trunk: clownfish/perl/lib/Clownfish/ clownfish/src/ perl/buildlib/Lucy/Build/Binding/ perl/buildlib/Lucy/Build/Binding/Index/ perl/buildlib/Lucy/Build/Binding/Search/ perl/buildlib/Lucy/Build/Binding/Test/ perl...

Author: marvin
Date: Wed Feb 15 05:13:21 2012
New Revision: 1244363

URL: http://svn.apache.org/viewvc?rev=1244363&view=rev
Log:
Blacklist methods which shouldn't be bound.

Change from whitelisting methods to be bound to blacklisting methods which
should be not be bound.  This increases the size of the compiled object
somewhat, but lowers maintenance costs by decreasing the amount of code it
takes to maintain a host binding and by automatically binding new methods as
they are added.

Some methods can only be bound manually because they contain types which
cannot be mapped automatically.  These are now silently excluded from binding
by default.

Modified:
    incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.xs
    incubator/lucy/trunk/clownfish/src/CFCPerlClass.c
    incubator/lucy/trunk/clownfish/src/CFCPerlClass.h
    incubator/lucy/trunk/clownfish/src/CFCPerlMethod.c
    incubator/lucy/trunk/clownfish/src/CFCPerlTypeMap.c
    incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Analysis.pm
    incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Document.pm
    incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Highlight.pm
    incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index.pm
    incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index/Posting.pm
    incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Object.pm
    incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Plan.pm
    incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Search.pm
    incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Search/Collector.pm
    incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Store.pm
    incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Test/Util.pm
    incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Util.pm
    incubator/lucy/trunk/perl/buildlib/LucyX/Build/Binding/Search.pm
    incubator/lucy/trunk/perl/lib/Lucy.pm
    incubator/lucy/trunk/perl/xs/Lucy/Index/PolyReader.c
    incubator/lucy/trunk/perl/xs/Lucy/Index/SegReader.c

Modified: incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.xs
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.xs?rev=1244363&r1=1244362&r2=1244363&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.xs (original)
+++ incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.xs Wed Feb 15 05:13:21 2012
@@ -1916,6 +1916,13 @@ PPCODE:
     CFCPerlClass_bind_constructor(self, alias, init);
 
 void
+exclude_method(self, method)
+    CFCPerlClass *self;
+    const char *method;
+PPCODE:
+    CFCPerlClass_exclude_method(self, method);
+
+void
 append_xs(self, xs)
     CFCPerlClass *self;
     const char *xs;

Modified: incubator/lucy/trunk/clownfish/src/CFCPerlClass.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCPerlClass.c?rev=1244363&r1=1244362&r2=1244363&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCPerlClass.c (original)
+++ incubator/lucy/trunk/clownfish/src/CFCPerlClass.c Wed Feb 15 05:13:21 2012
@@ -29,9 +29,12 @@
 #include "CFCFunction.h"
 #include "CFCDocuComment.h"
 #include "CFCSymbol.h"
+#include "CFCVariable.h"
+#include "CFCType.h"
 #include "CFCPerlPod.h"
 #include "CFCPerlMethod.h"
 #include "CFCPerlConstructor.h"
+#include "CFCPerlTypeMap.h"
 
 struct CFCPerlClass {
     CFCBase base;
@@ -43,6 +46,8 @@ struct CFCPerlClass {
     char **meth_aliases;
     char **meth_names;
     size_t num_methods;
+    char **excluded;
+    size_t num_excluded;
     char **cons_aliases;
     char **cons_inits;
     size_t num_cons;
@@ -78,6 +83,8 @@ CFCPerlClass_init(CFCPerlClass *self, CF
     self->meth_aliases = NULL;
     self->meth_names   = NULL;
     self->num_methods  = 0;
+    self->excluded     = NULL;
+    self->num_excluded = 0;
     self->cons_aliases = NULL;
     self->cons_inits   = NULL;
     self->num_cons     = 0;
@@ -97,6 +104,10 @@ CFCPerlClass_destroy(CFCPerlClass *self)
     }
     FREEMEM(self->meth_aliases);
     FREEMEM(self->meth_names);
+    for (size_t i = 0; i < self->num_excluded; i++) {
+        FREEMEM(self->excluded[i]);
+    }
+    FREEMEM(self->excluded);
     for (size_t i = 0; i < self->num_cons; i++) {
         FREEMEM(self->cons_aliases);
         FREEMEM(self->cons_inits);
@@ -178,6 +189,14 @@ CFCPerlClass_bind_method(CFCPerlClass *s
 }
 
 void
+CFCPerlClass_exclude_method(CFCPerlClass *self, const char *method) {
+    size_t size = (self->num_excluded + 1) * sizeof(char*);
+    self->excluded = (char**)REALLOCATE(self->excluded, size);
+    self->excluded[self->num_excluded] = (char*)CFCUtil_strdup(method);
+    self->num_excluded++;
+}
+
+void
 CFCPerlClass_bind_constructor(CFCPerlClass *self, const char *alias,
                               const char *initializer) {
     alias       = alias       ? alias       : "new";
@@ -194,33 +213,74 @@ CFCPerlClass_bind_constructor(CFCPerlCla
     }
 }
 
+static int
+S_method_can_be_bound(CFCMethod *method) {
+    int success = 1;
+    CFCParamList *param_list = CFCMethod_get_param_list(method);
+    CFCVariable **arg_vars = CFCParamList_get_variables(param_list);
+
+    for (size_t i = 0; arg_vars[i] != NULL; i++) {
+        CFCType *type = CFCVariable_get_type(arg_vars[i]);
+        char *conversion = CFCPerlTypeMap_from_perl(type, "foo");
+        if (conversion) { FREEMEM(conversion); }
+        else            { success = 0; }
+    }
+
+    CFCType *return_type = CFCMethod_get_return_type(method);
+    if (!CFCType_is_void(return_type)) {
+        char *conversion = CFCPerlTypeMap_to_perl(return_type, "foo");
+        if (conversion) { FREEMEM(conversion); }
+        else            { success = 0; }
+    }
+
+    return success;
+}
+
 CFCPerlMethod**
 CFCPerlClass_method_bindings(CFCPerlClass *self) {
     CFCClass       *client     = self->client;
     const char     *class_name = self->class_name;
     size_t          num_bound  = 0;
+    CFCMethod     **fresh_methods = CFCClass_fresh_methods(client);
+    CFCClass      **descendants   = CFCClass_tree_to_ladder(client);
     CFCPerlMethod **bound 
         = (CFCPerlMethod**)CALLOCATE(1, sizeof(CFCPerlMethod*));
-
-    // Iterate over the list of methods to be bound.
-    for (size_t i = 0; i < self->num_methods; i++) {
-        const char *meth_name = self->meth_names[i];
-        CFCMethod *method = CFCClass_method(client, meth_name);
-
-        // Safety checks against bad specs, excess binding code or private
-        // methods.
-        if (!method) {
-            CFCUtil_die("Can't find method '%s' for class '%s'", meth_name,
-                        class_name);
+ 
+     // Iterate over the class's fresh methods.
+    for (size_t i = 0; fresh_methods[i] != NULL; i++) {
+        CFCMethod  *method    = fresh_methods[i];
+        const char *alias     = CFCMethod_micro_sym(method);
+        const char *meth_name = CFCMethod_get_macro_sym(method);
+
+        // Only deal with methods when they are novel (i.e. first declared).
+        if (!CFCMethod_novel(method)) { continue; }
+
+        // Skip private methods.
+        if (CFCSymbol_private((CFCSymbol*)method)) { continue; }
+
+        // Skip methods which have been explicitly excluded.
+        int is_excluded = 0;
+        for (size_t j = 0; j < self->num_excluded; j++) {
+            if (strcmp(self->excluded[j], meth_name) == 0) {
+                is_excluded = 1;
+                break;
+            }
         }
-        else if (!CFCMethod_novel(method)) {
-            CFCUtil_die("Binding spec'd for method '%s' in class '%s', "
-                        "but it's overridden and should be bound via the "
-                        "parent class", meth_name, class_name);
+        if (is_excluded) { continue; }
+
+        // Skip methods with types which cannot be mapped automatically.
+        if (!S_method_can_be_bound(method)) {
+            continue;
         }
-        else if (CFCSymbol_private((CFCSymbol*)method)) {
-            CFCUtil_die("Can't bind private method '%s' in class '%s', ",
-                        meth_name, class_name);
+
+        // See if the user wants the method to have a specific alias.
+        for (size_t j = 0; j < self->num_methods; j++) {
+            const char *maybe = self->meth_names[j];
+            if (strcmp(maybe, meth_name) == 0) {
+                if (self->meth_aliases[j]) {
+                    alias = self->meth_aliases[j];
+                }
+            }
         }
 
         /* Create an XSub binding for each override.  Each of these directly
@@ -228,7 +288,6 @@ CFCPerlClass_method_bindings(CFCPerlClas
          * the object using VTable method dispatch.  Doing things this way
          * allows SUPER:: invocations from Perl-space to work properly.
          */
-        CFCClass **descendants = CFCClass_tree_to_ladder(client);
         for (size_t j = 0; descendants[j] != NULL; j++) {
             CFCClass *descendant = descendants[j];
             CFCMethod *real_method
@@ -236,16 +295,19 @@ CFCPerlClass_method_bindings(CFCPerlClas
             if (!real_method) { continue; }
 
             // Create the binding, add it to the array.
-            CFCPerlMethod *meth_binding
-                = CFCPerlMethod_new(real_method, self->meth_aliases[i]);
+            CFCPerlMethod *meth_binding = CFCPerlMethod_new(real_method, alias);
             size_t size = (num_bound + 2) * sizeof(CFCPerlMethod*);
             bound = (CFCPerlMethod**)REALLOCATE(bound, size);
             bound[num_bound] = meth_binding;
             num_bound++;
             bound[num_bound] = NULL;
         }
+
     }
 
+    FREEMEM(fresh_methods);
+    FREEMEM(descendants);
+
     return bound;
 }
 

Modified: incubator/lucy/trunk/clownfish/src/CFCPerlClass.h
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCPerlClass.h?rev=1244363&r1=1244362&r2=1244363&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCPerlClass.h (original)
+++ incubator/lucy/trunk/clownfish/src/CFCPerlClass.h Wed Feb 15 05:13:21 2012
@@ -59,6 +59,9 @@ void
 CFCPerlClass_bind_constructor(CFCPerlClass *self, const char *alias,
                               const char *initializer);
 
+void
+CFCPerlClass_exclude_method(CFCPerlClass *self, const char *method);
+
 struct CFCPerlMethod**
 CFCPerlClass_method_bindings(CFCPerlClass *self);
 

Modified: incubator/lucy/trunk/clownfish/src/CFCPerlMethod.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCPerlMethod.c?rev=1244363&r1=1244362&r2=1244363&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCPerlMethod.c (original)
+++ incubator/lucy/trunk/clownfish/src/CFCPerlMethod.c Wed Feb 15 05:13:21 2012
@@ -130,6 +130,9 @@ S_xsub_body(CFCPerlMethod *self) {
         CFCType *return_type = CFCMethod_get_return_type(method);
         const char *type_str = CFCType_to_c(return_type);
         char *assignment = CFCPerlTypeMap_to_perl(return_type, "retval");
+        if (!assignment) {
+            CFCUtil_die("Can't find typemap for '%s'", type_str);
+        }
         body = CFCUtil_cat(body, type_str, " retval = ", full_func_sym, "(",
                            name_list, ");\n    ST(0) = ", assignment, ";",
                            NULL);
@@ -284,6 +287,9 @@ S_xsub_def_positional_args(CFCPerlMethod
             sprintf(perl_stack_var, "ST(%u)", i);
             char *conversion
                 = CFCPerlTypeMap_from_perl(var_type, perl_stack_var);
+            if (!conversion) {
+                CFCUtil_die("Can't map type '%s'", type_c);
+            }
             if (val) {
                 char pattern[] =
                     "\n    %s %s = ( items >= %u && XSBind_sv_defined(ST(%u)) )"

Modified: incubator/lucy/trunk/clownfish/src/CFCPerlTypeMap.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCPerlTypeMap.c?rev=1244363&r1=1244362&r2=1244363&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCPerlTypeMap.c (original)
+++ incubator/lucy/trunk/clownfish/src/CFCPerlTypeMap.c Wed Feb 15 05:13:21 2012
@@ -118,10 +118,6 @@ CFCPerlTypeMap_from_perl(CFCType *type, 
         }
     }
 
-    if (!result) {
-        CFCUtil_die("Missing typemap for '%s'", CFCType_to_c(type));
-    }
-
     return result;
 }
 
@@ -206,10 +202,6 @@ CFCPerlTypeMap_to_perl(CFCType *type, co
         }
     }
 
-    if (!result) {
-        CFCUtil_die("Missing typemap for '%s'", CFCType_to_c(type));
-    }
-
     return result;
 }
 

Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Analysis.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Analysis.pm?rev=1244363&r1=1244362&r2=1244363&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Analysis.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Analysis.pm Wed Feb 15 05:13:21 2012
@@ -42,7 +42,6 @@ sub bind_analyzer {
         class_name => "Lucy::Analysis::Analyzer",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -143,7 +142,6 @@ END_XS
         parcel     => "Lucy",
         class_name => "Lucy::Analysis::Inversion",
     );
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->append_xs($xs);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -210,7 +208,6 @@ END_CONSTRUCTOR
         class_name => "Lucy::Analysis::PolyAnalyzer",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -344,6 +341,10 @@ sub bind_token {
         Get_Boost
         Get_Pos_Inc
     );
+    my @hand_rolled = qw(
+        Set_Text
+        Get_Text
+    ); 
 
     my $xs = <<'END_XS';
 MODULE = Lucy    PACKAGE = Lucy::Analysis::Token
@@ -405,8 +406,8 @@ END_XS
         parcel     => "Lucy",
         class_name => "Lucy::Analysis::Token",
     );
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->append_xs($xs);
+    $binding->exclude_method($_) for @hand_rolled;
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
 }

Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Document.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Document.pm?rev=1244363&r1=1244362&r2=1244363&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Document.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Document.pm Wed Feb 15 05:13:21 2012
@@ -25,6 +25,7 @@ sub bind_all {
 sub bind_doc {
     my @bound = qw( Set_Doc_ID Get_Doc_ID );
     my @exposed = ( @bound, 'Get_Fields' );
+    my @hand_rolled = qw( Set_Fields Get_Fields );
 
     my $pod_spec = Clownfish::CFC::Binding::Perl::Pod->new;
     my $synopsis = <<'END_SYNOPSIS';
@@ -103,8 +104,8 @@ END_XS_CODE
         parcel     => "Lucy",
         class_name => "Lucy::Document::Doc",
     );
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->append_xs($xs_code);
+    $binding->exclude_method($_) for @hand_rolled;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -168,7 +169,6 @@ END_XS_CODE
         parcel     => "Lucy",
         class_name => "Lucy::Document::HitDoc",
     );
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->append_xs($xs_code);
     $binding->set_pod_spec($pod_spec);
 

Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Highlight.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Highlight.pm?rev=1244363&r1=1244362&r2=1244363&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Highlight.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Highlight.pm Wed Feb 15 05:13:21 2012
@@ -44,7 +44,6 @@ END_CONSTRUCTOR
         class_name => "Lucy::Highlight::HeatMap",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     #$binding->set_pod_spec($pod_spec); TODO
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -97,7 +96,6 @@ END_CONSTRUCTOR
         class_name => "Lucy::Highlight::Highlighter",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_ ) for @bound;
     $binding->bind_method(
         alias  => '_find_best_fragment',
         method => 'Find_Best_Fragment'

Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index.pm?rev=1244363&r1=1244362&r2=1244363&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index.pm Wed Feb 15 05:13:21 2012
@@ -89,7 +89,6 @@ END_CONSTRUCTOR
         class_name => "Lucy::Index::BackgroundMerger",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -129,7 +128,6 @@ END_CONSTRUCTOR
         class_name => "Lucy::Index::DataReader",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -172,7 +170,6 @@ END_CONSTRUCTOR
         class_name => "Lucy::Index::DataWriter",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -186,7 +183,6 @@ sub bind_deletionsreader {
         class_name => "Lucy::Index::DeletionsReader",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
 }
@@ -198,7 +194,6 @@ sub bind_defaultdeletionsreader {
         class_name => "Lucy::Index::DefaultDeletionsReader",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     Clownfish::CFC::Binding::Perl::Class->register($binding);
 }
 
@@ -234,7 +229,6 @@ END_SYNOPSIS
         parcel     => "Lucy",
         class_name => "Lucy::Index::DeletionsWriter",
     );
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -266,7 +260,6 @@ END_SYNOPSIS
         class_name => "Lucy::Index::DocReader",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -288,7 +281,6 @@ sub bind_docvector {
         class_name => "Lucy::Index::DocVector",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     Clownfish::CFC::Binding::Perl::Class->register($binding);
 }
 
@@ -308,7 +300,6 @@ sub bind_filepurger {
         class_name => "Lucy::Index::FilePurger",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     Clownfish::CFC::Binding::Perl::Class->register($binding);
 }
 
@@ -405,7 +396,6 @@ END_CONSTRUCTOR
         class_name => "Lucy::Index::IndexManager",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -492,7 +482,6 @@ END_XS_CODE
         alias       => 'open',
         initializer => 'do_open',
     );
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->bind_method( alias => '_offsets', method => 'Offsets' );
     $binding->append_xs($xs_code);
     $binding->set_pod_spec($pod_spec);
@@ -511,6 +500,7 @@ sub bind_indexer {
         Get_Schema
     );
     my @bound = @exposed;
+    my @hand_rolled = qw( Add_Doc );
 
     my $pod_spec = Clownfish::CFC::Binding::Perl::Pod->new;
     my $synopsis = <<'END_SYNOPSIS';
@@ -679,7 +669,7 @@ END_XS_CODE
         class_name => "Lucy::Index::Indexer",
     );
     $binding->bind_constructor( alias => '_new' );
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+    $binding->exclude_method($_) for @hand_rolled;
     $binding->append_xs($xs_code);
     $binding->set_pod_spec($pod_spec);
 
@@ -705,7 +695,6 @@ sub bind_inverter {
         class_name => "Lucy::Index::Inverter",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
 }
@@ -735,7 +724,6 @@ END_SYNOPSIS
         class_name => "Lucy::Index::Lexicon",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -758,7 +746,6 @@ END_SYNOPSIS
         class_name => "Lucy::Index::LexiconReader",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -826,7 +813,6 @@ END_XS_CODE
     );
     $binding->bind_constructor;
     $binding->bind_constructor( alias => 'open', initializer => 'do_open' );
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->append_xs($xs_code);
     $binding->set_pod_spec($pod_spec);
 
@@ -840,7 +826,6 @@ sub bind_posting {
         parcel     => "Lucy",
         class_name => "Lucy::Index::Posting",
     );
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
 }
@@ -880,7 +865,6 @@ END_SYNOPSIS
         class_name => "Lucy::Index::PostingList",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -907,7 +891,6 @@ END_SYNOPSIS
         class_name => "Lucy::Index::PostingListReader",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -951,7 +934,6 @@ sub bind_seglexicon {
         class_name => "Lucy::Index::SegLexicon",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
 }
@@ -964,7 +946,6 @@ sub bind_segpostinglist {
         class_name => "Lucy::Index::SegPostingList",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
 }
@@ -1001,7 +982,6 @@ END_SYNOPSIS
         class_name => "Lucy::Index::SegReader",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -1023,7 +1003,6 @@ sub bind_segwriter {
         class_name => "Lucy::Index::SegWriter",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -1094,7 +1073,6 @@ END_SYNOPSIS
         class_name => "Lucy::Index::Segment",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->bind_method(
         alias  => '_store_metadata',
         method => 'Store_Metadata',
@@ -1117,6 +1095,7 @@ sub bind_similarity {
     my @exposed = qw(
         Length_Norm
     );
+    my @hand_rolled = qw( Get_Norm_Decoder );
 
     my $pod_spec = Clownfish::CFC::Binding::Perl::Pod->new;
     my $synopsis = <<'END_SYNOPSIS';
@@ -1151,7 +1130,7 @@ END_XS_CODE
         class_name => "Lucy::Index::Similarity",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+    $binding->exclude_method($_) for @hand_rolled;
     $binding->append_xs($xs_code);
     $binding->set_pod_spec($pod_spec);
 
@@ -1190,7 +1169,6 @@ END_CONSTRUCTOR
         class_name => "Lucy::Index::Snapshot",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -1198,6 +1176,7 @@ END_CONSTRUCTOR
 
 sub bind_sortcache {
     my @bound = qw( Ordinal Find );
+    my @hand_rolled = qw( Value );
 
     my $xs_code = <<'END_XS_CODE';
 MODULE = Lucy   PACKAGE = Lucy::Index::SortCache
@@ -1230,7 +1209,7 @@ END_XS_CODE
         parcel     => "Lucy",
         class_name => "Lucy::Index::SortCache",
     );
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+    $binding->exclude_method($_) for @hand_rolled;
     $binding->append_xs($xs_code);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -1243,7 +1222,6 @@ sub bind_sortreader {
         class_name => "Lucy::Index::SortReader",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
 }
@@ -1297,7 +1275,6 @@ sub bind_terminfo {
         class_name => "Lucy::Index::TermInfo",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
 }
@@ -1314,7 +1291,6 @@ sub bind_termvector {
         class_name => "Lucy::Index::TermVector",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
 }

Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index/Posting.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index/Posting.pm?rev=1244363&r1=1244362&r2=1244363&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index/Posting.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index/Posting.pm Wed Feb 15 05:13:21 2012
@@ -31,7 +31,6 @@ sub bind_matchposting {
         class_name => "Lucy::Index::Posting::MatchPosting",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
 }
@@ -47,6 +46,8 @@ sub bind_richposting {
 }
 
 sub bind_scoreposting {
+    my @hand_rolled = qw( Get_Prox );
+
     my $xs_code = <<'END_XS_CODE';
 MODULE = Lucy   PACKAGE = Lucy::Index::Posting::ScorePosting
 
@@ -75,6 +76,7 @@ END_XS_CODE
     );
     $binding->bind_constructor;
     $binding->append_xs($xs_code);
+    $binding->exclude_method($_) for @hand_rolled;
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
 }

Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Object.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Object.pm?rev=1244363&r1=1244362&r2=1244363&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Object.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Object.pm Wed Feb 15 05:13:21 2012
@@ -75,7 +75,6 @@ END_CONSTRUCTOR
         class_name => "Lucy::Object::BitVector",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -120,7 +119,6 @@ END_XS_CODE
         parcel     => "Lucy",
         class_name => "Lucy::Object::ByteBuf",
     );
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->append_xs($xs_code);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -223,7 +221,6 @@ END_SYNOPSIS
         class_name => "Lucy::Object::Err",
     );
     $binding->bind_constructor( alias => '_new' );
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -240,6 +237,10 @@ sub bind_hash {
         Iterate
         Get_Size
     );
+    my @hand_rolled = qw(
+        Store
+        Next
+    );
 
     my $xs_code = <<'END_XS_CODE';
 MODULE =  Lucy    PACKAGE = Lucy::Object::Hash
@@ -299,7 +300,7 @@ END_XS_CODE
         class_name => "Lucy::Object::Hash",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+    $binding->exclude_method($_) for @hand_rolled;
     $binding->append_xs($xs_code);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -465,7 +466,6 @@ END_XS_CODE
         parcel     => "Lucy",
         class_name => "Lucy::Object::I32Array",
     );
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->append_xs($xs_code);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -479,7 +479,6 @@ sub bind_lockfreeregistry {
         class_name => "Lucy::Object::LockFreeRegistry",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
 }
@@ -507,7 +506,6 @@ END_XS_CODE
         parcel     => "Lucy",
         class_name => "Lucy::Object::Float32",
     );
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->append_xs($float32_xs_code);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -536,7 +534,6 @@ END_XS_CODE
         parcel     => "Lucy",
         class_name => "Lucy::Object::Float64",
     );
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->append_xs($float64_xs_code);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -560,7 +557,6 @@ sub bind_obj {
         Deserialize
         Destroy
     );
-
     my @exposed = qw(
         To_String
         To_I64
@@ -569,6 +565,9 @@ sub bind_obj {
         Dump
         Load
     );
+    my @hand_rolled = qw(
+        Is_A
+    );
 
     my $pod_spec = Clownfish::CFC::Binding::Perl::Pod->new;
     my $synopsis = <<'END_SYNOPSIS';
@@ -749,8 +748,8 @@ END_XS_CODE
         class_name => "Lucy::Object::Obj",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->bind_method( alias => '_load', method => 'Load' );
+    $binding->exclude_method($_) for @hand_rolled;
     $binding->append_xs($xs_code);
     $binding->set_pod_spec($pod_spec);
 
@@ -766,6 +765,14 @@ sub bind_varray {
         Resize
         Get_Size
     );
+    my @hand_rolled = qw(
+        Shallow_Copy
+        Shift
+        Pop
+        Delete
+        Store
+        Fetch
+    );
 
     my $xs_code = <<'END_XS_CODE';
 MODULE = Lucy   PACKAGE = Lucy::Object::VArray
@@ -840,7 +847,7 @@ END_XS_CODE
         class_name => "Lucy::Object::VArray",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+    $binding->exclude_method($_) for @hand_rolled;
     $binding->append_xs($xs_code);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -848,6 +855,7 @@ END_XS_CODE
 
 sub bind_vtable {
     my @bound = qw( Get_Name Get_Parent );
+    my @hand_rolled = qw( Make_Obj );
 
     my $xs_code = <<'END_XS_CODE';
 MODULE = Lucy   PACKAGE = Lucy::Object::VTable
@@ -898,7 +906,7 @@ END_XS_CODE
         parcel     => "Lucy",
         class_name => "Lucy::Object::VTable",
     );
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+    $binding->exclude_method($_) for @hand_rolled;
     $binding->append_xs($xs_code);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);

Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Plan.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Plan.pm?rev=1244363&r1=1244362&r2=1244363&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Plan.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Plan.pm Wed Feb 15 05:13:21 2012
@@ -108,7 +108,6 @@ END_CONSTRUCTOR
         class_name => "Lucy::Plan::Architecture",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -168,7 +167,6 @@ END_SYNOPSIS
         class_name => "Lucy::Plan::FieldType",
     );
     $binding->bind_constructor( alias => 'new', initializer => 'init2' );
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -230,7 +228,6 @@ END_CONSTRUCTOR
         class_name => "Lucy::Plan::FullTextType",
     );
     $binding->bind_constructor( alias => 'new', initializer => 'init2' );
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -295,7 +292,6 @@ END_CONSTRUCTOR
         class_name => "Lucy::Plan::Schema",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);

Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Search.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Search.pm?rev=1244363&r1=1244362&r2=1244363&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Search.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Search.pm Wed Feb 15 05:13:21 2012
@@ -135,7 +135,6 @@ END_CONSTRUCTOR
         class_name => "Lucy::Search::Collector",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -191,7 +190,6 @@ END_CONSTRUCTOR_CODE_SAMPLE
         class_name => "Lucy::Search::Compiler",
     );
     $binding->bind_constructor( alias => 'do_new' );
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -229,7 +227,6 @@ END_SYNOPSIS
         class_name => "Lucy::Search::Hits",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -274,7 +271,6 @@ END_CONSTRUCTOR
         class_name => "Lucy::Search::IndexSearcher",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -317,7 +313,6 @@ END_CONSTRUCTOR
         class_name => "Lucy::Search::LeafQuery",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -355,7 +350,6 @@ sub bind_matchdoc {
         class_name => "Lucy::Search::MatchDoc",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
 }
@@ -385,7 +379,6 @@ END_CONSTRUCTOR_CODE_SAMPLE
         class_name => "Lucy::Search::Matcher",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -432,7 +425,6 @@ END_CONSTRUCTOR
         class_name => "Lucy::Search::NOTQuery",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -515,7 +507,6 @@ END_SYNOPSIS
         class_name => "Lucy::Search::PhraseQuery",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -559,7 +550,6 @@ END_SYNOPSIS
         class_name => "Lucy::Search::PolyQuery",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -642,7 +632,6 @@ END_CONSTRUCTOR_CODE_SAMPLE
         class_name => "Lucy::Search::Query",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->bind_method(
         alias  => '_make_compiler',
         method => 'Make_Compiler',
@@ -703,7 +692,6 @@ END_CONSTRUCTOR
         class_name => "Lucy::Search::QueryParser",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -792,7 +780,6 @@ END_CONSTRUCTOR
         class_name => "Lucy::Search::RequiredOptionalQuery",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -836,7 +823,6 @@ END_CONSTRUCTOR
         class_name => "Lucy::Search::Searcher",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -895,7 +881,6 @@ END_XS_CODE
         class_name => "Lucy::Search::SortRule",
     );
     $binding->bind_constructor( alias => '_new' );
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->append_xs($xs_code);
     $binding->set_pod_spec($pod_spec);
 
@@ -929,7 +914,6 @@ END_CONSTRUCTOR
         class_name => "Lucy::Search::SortSpec",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -972,7 +956,6 @@ END_CONSTRUCTOR
         class_name => "Lucy::Search::Span",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -1005,7 +988,6 @@ END_CONSTRUCTOR
         class_name => "Lucy::Search::TermQuery",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -1032,7 +1014,6 @@ sub bind_topdocs {
         class_name => "Lucy::Search::TopDocs",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
 }

Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Search/Collector.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Search/Collector.pm?rev=1244363&r1=1244362&r2=1244363&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Search/Collector.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Search/Collector.pm Wed Feb 15 05:13:21 2012
@@ -65,7 +65,6 @@ sub bind_sortcollector {
         class_name => "Lucy::Search::Collector::SortCollector",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
 }

Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Store.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Store.pm?rev=1244363&r1=1244362&r2=1244363&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Store.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Store.pm Wed Feb 15 05:13:21 2012
@@ -125,7 +125,6 @@ END_XS_CODE
         class_name => "Lucy::Store::FileHandle",
     );
     $binding->bind_constructor( alias => '_open', initializer => 'do_open' );
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->append_xs($xs_code);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -154,7 +153,6 @@ sub bind_folder {
         class_name => "Lucy::Store::Folder",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -178,6 +176,9 @@ sub bind_instream {
         Read_F32
         Read_F64
     );
+    my @hand_rolled = qw(
+        Read_Raw_C64
+    );
 
     my $xs_code = <<'END_XS_CODE';
 MODULE = Lucy    PACKAGE = Lucy::Store::InStream
@@ -241,7 +242,7 @@ END_XS_CODE
         class_name => "Lucy::Store::InStream",
     );
     $binding->bind_constructor( alias => 'open', initializer => 'do_open' );
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+    $binding->exclude_method($_) for @hand_rolled;
     $binding->append_xs($xs_code);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -292,7 +293,6 @@ END_CONSTRUCTOR
         class_name => "Lucy::Store::Lock",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -383,7 +383,6 @@ END_CONSTRUCTOR
         class_name => "Lucy::Store::LockFactory",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -442,7 +441,6 @@ END_XS_CODE
         class_name => "Lucy::Store::OutStream",
     );
     $binding->bind_constructor( alias => 'open', initializer => 'do_open' );
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->append_xs($xs_code);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -456,7 +454,6 @@ sub bind_ramfile {
         class_name => "Lucy::Store::RAMFile",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
 }
@@ -469,7 +466,6 @@ sub bind_ramfilehandle {
         class_name => "Lucy::Store::RAMFileHandle",
     );
     $binding->bind_constructor( alias => '_open', initializer => 'do_open' );
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
 }

Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Test/Util.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Test/Util.pm?rev=1244363&r1=1244362&r2=1244363&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Test/Util.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Test/Util.pm Wed Feb 15 05:13:21 2012
@@ -22,6 +22,11 @@ sub bind_all {
 }
 
 sub bind_bbsortex {
+    my @hand_rolled = qw(
+        Fetch
+        Peek
+        Feed
+    );
     my $xs_code = <<'END_XS_CODE';
 MODULE = Lucy    PACKAGE = Lucy::Test::Util::BBSortEx
 
@@ -71,6 +76,7 @@ END_XS_CODE
         class_name => "Lucy::Test::Util::BBSortEx",
     );
     $binding->bind_constructor;
+    $binding->exclude_method($_) for @hand_rolled;
     $binding->append_xs($xs_code);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);

Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Util.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Util.pm?rev=1244363&r1=1244362&r2=1244363&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Util.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Util.pm Wed Feb 15 05:13:21 2012
@@ -163,7 +163,6 @@ sub bind_priorityqueue {
         class_name => "Lucy::Util::PriorityQueue",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
 }
@@ -194,7 +193,6 @@ END_XS_CODE
         parcel     => "Lucy",
         class_name => "Lucy::Util::SortExternal",
     );
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->append_xs($xs_code);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -207,7 +205,6 @@ sub bind_stepper {
         parcel     => "Lucy",
         class_name => "Lucy::Util::Stepper",
     );
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);
 }

Modified: incubator/lucy/trunk/perl/buildlib/LucyX/Build/Binding/Search.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/LucyX/Build/Binding/Search.pm?rev=1244363&r1=1244362&r2=1244363&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/LucyX/Build/Binding/Search.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/LucyX/Build/Binding/Search.pm Wed Feb 15 05:13:21 2012
@@ -64,7 +64,6 @@ END_SYNOPSIS
         class_name => "LucyX::Search::ProximityQuery",
     );
     $binding->bind_constructor;
-    $binding->bind_method( method => $_, alias => lc($_) ) for @bound;
     $binding->set_pod_spec($pod_spec);
 
     Clownfish::CFC::Binding::Perl::Class->register($binding);

Modified: incubator/lucy/trunk/perl/lib/Lucy.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/lib/Lucy.pm?rev=1244363&r1=1244362&r2=1244363&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/lib/Lucy.pm (original)
+++ incubator/lucy/trunk/perl/lib/Lucy.pm Wed Feb 15 05:13:21 2012
@@ -250,7 +250,7 @@ sub error {$Lucy::Object::Err::error}
     package Lucy::Index::PolyReader;
     use Lucy qw( to_clownfish );
 
-    sub try_read_snapshot {
+    sub _try_read_snapshot {
         my ( undef, %args ) = @_;
         my ( $snapshot, $folder, $path ) = @args{qw( snapshot folder path )};
         eval { $snapshot->read_file( folder => $folder, path => $path ); };
@@ -258,7 +258,7 @@ sub error {$Lucy::Object::Err::error}
         else      { return undef }
     }
 
-    sub try_open_segreaders {
+    sub _try_open_segreaders {
         my ( $self, $segments ) = @_;
         my $schema   = $self->get_schema;
         my $folder   = $self->get_folder;
@@ -300,7 +300,7 @@ sub error {$Lucy::Object::Err::error}
 {
     package Lucy::Index::SegReader;
 
-    sub try_init_components {
+    sub _try_init_components {
         my $self = shift;
         my $arch = $self->get_schema->get_architecture;
         eval { $arch->init_seg_reader($self); };

Modified: incubator/lucy/trunk/perl/xs/Lucy/Index/PolyReader.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/xs/Lucy/Index/PolyReader.c?rev=1244363&r1=1244362&r2=1244363&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/xs/Lucy/Index/PolyReader.c (original)
+++ incubator/lucy/trunk/perl/xs/Lucy/Index/PolyReader.c Wed Feb 15 05:13:21 2012
@@ -23,14 +23,14 @@
 
 Obj*
 PolyReader_try_open_segreaders(PolyReader *self, VArray *segments) {
-    return Host_callback_obj(self, "try_open_segreaders", 1,
+    return Host_callback_obj(self, "_try_open_segreaders", 1,
                              ARG_OBJ("segments", segments));
 }
 
 CharBuf*
 PolyReader_try_read_snapshot(Snapshot *snapshot, Folder *folder,
                              const CharBuf *path) {
-    return (CharBuf*)Host_callback_obj(POLYREADER, "try_read_snapshot", 3,
+    return (CharBuf*)Host_callback_obj(POLYREADER, "_try_read_snapshot", 3,
                                        ARG_OBJ("snapshot", snapshot),
                                        ARG_OBJ("folder", folder),
                                        ARG_STR("path", path));

Modified: incubator/lucy/trunk/perl/xs/Lucy/Index/SegReader.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/xs/Lucy/Index/SegReader.c?rev=1244363&r1=1244362&r2=1244363&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/xs/Lucy/Index/SegReader.c (original)
+++ incubator/lucy/trunk/perl/xs/Lucy/Index/SegReader.c Wed Feb 15 05:13:21 2012
@@ -21,7 +21,7 @@
 
 CharBuf*
 SegReader_try_init_components(SegReader *self) {
-    return (CharBuf*)Host_callback_obj(self, "try_init_components", 0);
+    return (CharBuf*)Host_callback_obj(self, "_try_init_components", 0);
 }