09/06/2006
Perl XS and SWIG interface to CLucene C++ text search engine
21
CLucene.pm Perl OO Wrapper
lBack into the realms of sanity
lNormal OO package with methods
lCalls XS wrapper functions
sub open
{
        my $this = shift;
        my %arg = @_;
        my $path = $arg{path} || $this->{path} || confess "path undefined";
        my $create = anyof ( $arg{create}, $this->{create}, 0 );
        $this->{resource} = FulltextSearch::CLuceneWrap::CL_OPEN ( $path, $creat
e )
                or confess "Failed to CL_OPEN $this->{path} create $create errst
r ".$this->errstrglobal();
        $this->{path} = $path;
        $this;
}