Hi,

Please forgive the rapid-fire posts - I'm trying things out and the
following was unexpected:

$indexer = Lucy::Index::Indexer->new(...)
$index->add_index(...)
$index->commit

...do not return true/false based on success/failure, so you cannot:

$indexer = Lucy::Index::Indexer->new(...) or die "ERROR...";
$index->add_index(...) or die "ERROR...";
$index->commit or die "ERROR...";

...which would really be ideal.

I'm so used to coding with these kinds of checks in mind that not
being able to do so is weird :)

In fact, doing

$index->add_index($idxpath) or die;

... will always die, even on success.

Same with ->commit().

Anyway, not a train-smash, just mentioning it.  The only way to check
(sought of) for failure is with eval{}, which is not exactly elegant.

Cheers!
gk

Reply via email to