[Xapian-discuss] Perl XS bindings, postlist_begin

Francis Irving francis@flourish.org
Fri, 28 May 2004 08:37:48 +0100


On Fri, May 28, 2004 at 01:20:31AM +0100, Olly Betts wrote:
> But it looks like postlist_begin() isn't wrapped yet.  Since
> PostingIterator is now wrapped (as of 0.8.0.2) that's easy - patch
> attached.  I've not tested this beyond it compiling, but it's pretty
> trivial (famous last words...)
> 
> There's also a bonus patch hunk to fix a warning from GCC 3.3 (mostly
> for Alex's benefit).

Fab.  The patch applies, gives fewer warnings, and installs...  But I
still can't call the function on a Database.

    my $db=Search::Xapian::WritableDatabase->new($dbfile, Search::Xapian::DB_CREATE_OR_OPEN);
    my $post = $db->postlist_begin("ethiopia");

Can't locate auto/Search/Xapian/WritableDatabase/postlist_be.al in
@INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.3
/usr/local/share/perl/5.8.3 /usr/lib/perl5 /usr/share/perl5
/usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl
/usr/local/lib/perl/5.8.2 /usr/local/share/perl/5.8.2 .) at ./index.pl
line 38

I don't think I'm installing it wrong, as I get the same kind of
bizarre error with an existing function like allterms_begin.  

    my $db=Search::Xapian::WritableDatabase->new($dbfile, Search::Xapian::DB_CREATE_OR_OPEN);
    my $allterms = $db->allterms_begin()

Can't locate auto/Search/Xapian/WritableDatabase/allterms_be.al in
@INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.3
/usr/local/share/perl/5.8.3 /usr/lib/perl5 /usr/share/perl5
/usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl
/usr/local/lib/perl/5.8.2 /usr/local/share/perl/5.8.2 .) at ./index.pl
line 36

Is my syntax totally off?  It looks the same as the syntax which is
working for add_document:

    my $docid = $db->add_document($::doc);

Thanks for all your help,

Francis