s/Unqlite/UnQLite/g

This commit is contained in:
tokuhirom 2013-07-04 04:01:54 +09:00
parent 15245d2e1c
commit 2e3159537d
9 changed files with 48 additions and 46 deletions

4
.gitignore vendored
View file

@ -23,6 +23,6 @@ cover_db/
MYMETA.*
/Unqlite-*
lib/Unqlite.c
/UnQLite-*
lib/UnQLite.c
!lib/ppport.h

View file

@ -23,8 +23,8 @@ my %args = (
'Module::Build' => 0.38,
},
name => 'Unqlite',
module_name => 'Unqlite',
name => 'UnQLite',
module_name => 'UnQLite',
allow_pureperl => 0,
script_files => [glob('script/*'), glob('bin/*')],

View file

@ -1,10 +1,10 @@
{
"abstract" : "Perl bindings for Unqlite",
"abstract" : "Perl bindings for UnQLite",
"author" : [
"tokuhirom <tokuhirom@gmail.com>"
],
"dynamic_config" : 0,
"generated_by" : "Minilla/v0.5.5, CPAN::Meta::Converter version 2.131490",
"generated_by" : "Minilla/v0.5.5, CPAN::Meta::Converter version 2.130880",
"license" : [
"perl_5"
],
@ -12,7 +12,7 @@
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
"version" : "2"
},
"name" : "Unqlite",
"name" : "UnQLite",
"no_index" : {
"directory" : [
"t",

View file

@ -1,12 +1,12 @@
# NAME
Unqlite - Perl bindings for Unqlite
UnQLite - Perl bindings for UnQLite
# SYNOPSIS
use Unqlite;
use UnQLite;
my $db = Unqlite->open('foo.db');
my $db = UnQLite->open('foo.db');
$db->kv_store('foo', 'bar');
say $db->kv_fetch('foo'); # => bar
$db->kv_delete('foo');
@ -16,17 +16,17 @@ Unqlite - Perl bindings for Unqlite
UnQLite is a in-process software library which implements a self-contained, serverless, zero-configuration, transactional NoSQL database engine. UnQLite is a document store database similar to MongoDB, Redis, CouchDB etc. as well a standard Key/Value store similar to BerkeleyDB, LevelDB, etc.
This module is Perl5 binding for Unqlite.
This module is Perl5 binding for UnQLite.
If you want to know more information about Unqlite, see [http://unqlite.org/](http://unqlite.org/).
If you want to know more information about UnQLite, see [http://unqlite.org/](http://unqlite.org/).
This version of Unqlite.pm does not provides document store feature. Patches welcome.
This version of UnQLite.pm does not provides document store feature. Patches welcome.
__You can use Unqlite.pm as DBM__.
__You can use UnQLite.pm as DBM__.
# METHODS
- `my $db = Unqlite->open('foo.db'[, $mode]);`
- `my $db = UnQLite->open('foo.db'[, $mode]);`
Open the database.
@ -44,7 +44,7 @@ __You can use Unqlite.pm as DBM__.
- `$db->rc();`
Return code from unqlite. It may updates after any Unqlite API call.
Return code from UnQLite. It may updates after any UnQLite API call.
- `$db->errstr()`
@ -54,9 +54,9 @@ __You can use Unqlite.pm as DBM__.
Create new cursor object.
# Unqlite::Cursor
# UnQLite::Cursor
Unqlite supports cursor for iterating entries.
UnQLite supports cursor for iterating entries.
Here is example code:

View file

@ -1,4 +1,4 @@
package Unqlite;
package UnQLite;
use 5.008005;
use strict;
use warnings;
@ -9,11 +9,11 @@ our $rc = 0;
use XSLoader;
XSLoader::load(__PACKAGE__, $VERSION);
sub rc { $Unqlite::rc }
sub rc { $UnQLite::rc }
sub errstr {
my $self = shift;
if ($rc==Unqlite::UNQLITE_OK()) { return "UNQLITE_OK" }
if ($rc==UnQLite::UNQLITE_OK()) { return "UNQLITE_OK" }
if ($rc==UNQLITE_NOMEM()) { return "UNQLITE_NOMEM" }
if ($rc==UNQLITE_ABORT()) { return "UNQLITE_ABORT" }
if ($rc==UNQLITE_IOERR()) { return "UNQLITE_IOERR" }
@ -41,10 +41,10 @@ sub errstr {
sub cursor_init {
my $self = shift;
bless [$self->_cursor_init(), $self], 'Unqlite::Cursor';
bless [$self->_cursor_init(), $self], 'UnQLite::Cursor';
}
package Unqlite::Cursor;
package UnQLite::Cursor;
sub first_entry {
my $self = shift;
@ -101,15 +101,17 @@ __END__
=encoding utf-8
=for stopwords UnQLite serverless NoSQL CouchDB BerkeleyDB LevelDB stringified
=head1 NAME
Unqlite - Perl bindings for Unqlite
UnQLite - Perl bindings for UnQLite
=head1 SYNOPSIS
use Unqlite;
use UnQLite;
my $db = Unqlite->open('foo.db');
my $db = UnQLite->open('foo.db');
$db->kv_store('foo', 'bar');
say $db->kv_fetch('foo'); # => bar
$db->kv_delete('foo');
@ -119,19 +121,19 @@ Unqlite - Perl bindings for Unqlite
UnQLite is a in-process software library which implements a self-contained, serverless, zero-configuration, transactional NoSQL database engine. UnQLite is a document store database similar to MongoDB, Redis, CouchDB etc. as well a standard Key/Value store similar to BerkeleyDB, LevelDB, etc.
This module is Perl5 binding for Unqlite.
This module is Perl5 binding for UnQLite.
If you want to know more information about Unqlite, see L<http://unqlite.org/>.
If you want to know more information about UnQLite, see L<http://unqlite.org/>.
This version of Unqlite.pm does not provides document store feature. Patches welcome.
This version of UnQLite.pm does not provides document store feature. Patches welcome.
B<You can use Unqlite.pm as DBM>.
B<You can use UnQLite.pm as DBM>.
=head1 METHODS
=over 4
=item C<< my $db = Unqlite->open('foo.db'[, $mode]); >>
=item C<< my $db = UnQLite->open('foo.db'[, $mode]); >>
Open the database.
@ -149,7 +151,7 @@ Delte C< $key > from database.
=item C<< $db->rc(); >>
Return code from unqlite. It may updates after any Unqlite API call.
Return code from UnQLite. It may updates after any UnQLite API call.
=item C<< $db->errstr() >>
@ -161,9 +163,9 @@ Create new cursor object.
=back
=head1 Unqlite::Cursor
=head1 UnQLite::Cursor
Unqlite supports cursor for iterating entries.
UnQLite supports cursor for iterating entries.
Here is example code:

View file

@ -25,16 +25,16 @@ extern "C" {
#define SETRC(rc) \
{ \
SV * i = get_sv("Unqlite::rc", GV_ADD); \
SV * i = get_sv("UnQLite::rc", GV_ADD); \
SvIV_set(i, rc); \
}
MODULE = Unqlite PACKAGE = Unqlite
MODULE = UnQLite PACKAGE = UnQLite
PROTOTYPES: DISABLE
BOOT:
HV* stash = gv_stashpvn("Unqlite", strlen("Unqlite"), TRUE);
HV* stash = gv_stashpvn("UnQLite", strlen("UnQLite"), TRUE);
newCONSTSUB(stash, "UNQLITE_OK", newSViv(UNQLITE_OK));
newCONSTSUB(stash, "UNQLITE_NOMEM", newSViv(UNQLITE_NOMEM));
newCONSTSUB(stash, "UNQLITE_ABORT", newSViv(UNQLITE_ABORT));
@ -221,7 +221,7 @@ OUTPUT:
RETVAL
MODULE = Unqlite PACKAGE = Unqlite::Cursor
MODULE = UnQLite PACKAGE = UnQLite::Cursor
SV*
_first_entry(self)

View file

@ -2,7 +2,7 @@ use strict;
use Test::More;
use_ok $_ for qw(
Unqlite
UnQLite
);
done_testing;

View file

@ -2,13 +2,13 @@ use strict;
use Test::More;
use File::Temp qw(tempdir);
use Unqlite;
use UnQLite;
my $tmp = tempdir( CLEANUP => 1 );
{
my $db = Unqlite->open("$tmp/foo.db");
isa_ok($db, 'Unqlite');
my $db = UnQLite->open("$tmp/foo.db");
isa_ok($db, 'UnQLite');
ok($db->kv_store("foo", "bar"));
is($db->kv_fetch('foo'), 'bar');
@ -20,7 +20,7 @@ my $tmp = tempdir( CLEANUP => 1 );
is($db->rc,0);
}
my $db = Unqlite->open("/path/to/unexisted/file");
my $db = UnQLite->open("/path/to/unexisted/file");
is($db->kv_fetch('x'), undef);
isnt($db->rc, 0);
note $db->errstr;

View file

@ -2,13 +2,13 @@ use strict;
use Test::More;
use File::Temp qw(tempdir);
use Unqlite;
use UnQLite;
my $tmp = tempdir( CLEANUP => 1 );
my $db = Unqlite->open("$tmp/foo.db");
my $db = UnQLite->open("$tmp/foo.db");
{
isa_ok($db, 'Unqlite');
isa_ok($db, 'UnQLite');
ok($db->kv_store("foo", "bar"));
ok($db->kv_store("hoge", "fuga"));