incubator-lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marvin Humphrey (JIRA)" <>
Subject [jira] Updated: (LUCY-34) Update Perl binding build tools to use Boilerplater
Date Mon, 07 Sep 2009 20:30:57 GMT


Marvin Humphrey updated LUCY-34:

    Attachment:, to be installed as trunk/perl/lib/Lucy/, follows the pattern
for Perl modules described at
The meaningful pure-Perl code in the module itself simply loads, which
then loads the XS shared object and initializes everything under the Lucy
hierarchy -- including the arbitrary XS binding code embedded within
defining the XS routine Lucy::Test::TestCharmonizer::run_test().

Invoking Lucy::Test::TestCharmonizer::run_test($test_name) will now run code
from Charmonizer's test suite.

use Lucy::Test;

In order to make this work, the object files for all C test code have to be
linked into the Lucy shared object, bloating it up.  The bloat won't cause
meaningful problems for a while, but it's definitely undesirable and we'd like
to do away with it.

Under Unixen, we can automatically export C symbols via the core DynaLoader
module, so that they become visible to other shared objects.  See DynaLoader's
docs for an explanation of how the following incantation works:

require DynaLoader;
sub dl_load_flags {0x01}

If that worked everywhere, we could simply divvy up our object files into a
core shared object and a dedicated testing shared object; the testing code 
would then be able to resolve Lucy core symbols at runtime.

Unfortunately, that's not portable to all platforms.  I brought this topic up
a while ago on PerlMonks ([]) and was
advised to use a brute force technique of storing symbol names and addresses
in a global Perl hash.  That's the approach taken by Time::HiRes and now by my
module Lingua::Stem::Snowball, and it works OK when you only have a handful of
symbols to export -- but it's impractical for Lucy, where there will be

So, in the meantime, we'll just dump everything into the Lucy shared object.

> Update Perl binding build tools to use Boilerplater
> ---------------------------------------------------
>                 Key: LUCY-34
>                 URL:
>             Project: Lucy
>          Issue Type: Sub-task
>          Components: Boilerplater, Perl bindings
>            Reporter: Marvin Humphrey
>            Assignee: Marvin Humphrey
>         Attachments:
> Up till now, Boilerplater has existed in isolation, running its own test suite
> but not integrated with other parts of Lucy.  We'll address that by changing
> over the Charmonizer tests to run via the Boilerplater framework within the
> Perl bindings.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message