NAME
Senna::RC - Wrapper for sen_rc
SYNOPSIS
use Senna::RC;
use Senna::Constants qw(SEN_SUCCESS);
my $rc = Senna::RC->new(SEN_SUCCESS);
if ($rc) {
print "success!\n";
}
$rc->value;
DESCRIPTION
Senna::RC is a simple wrapper around sen_rc that allows you to evaluate results from Senna functions in Perl-ish boolean context, like
if ($index->insert($query)) {
...
}
Or, you can choose to access the internal sen_rc value:
my $rc = $index->insert($query);
if ($rc->value == SEN_SUCCESS) {
...
}
METHODS
new
Creates a new Senna::RC object
value
Returns the internal sen_rc value