Senna::RC - Wrapper for sen_rc
use Senna::RC; use Senna::Constants qw(SEN_SUCCESS); my $rc = Senna::RC->new(SEN_SUCCESS); if ($rc) { print "success!\n"; } $rc->value;
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) { ... }
Creates a new Senna::RC object
Returns the internal sen_rc value
Copyright (C) 2005 - 2006 by Daisuke Maki <dmaki@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
Development funded by Brazil Ltd. <http://dev.razil.jp/project/senna/>
To install Senna, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Senna
CPAN shell
perl -MCPAN -e shell install Senna
For more information on module installation, please visit the detailed CPAN module installation guide.