Subject: | Depends on ::DBB::* stuff when it doesn't need to |
Just a small nit. I am able to use this module without needing to use the ::DBD::GIN module. I
would prefer to avoid having BDB on my system, so it would be nice to not have to force through
failing tests because of missing libraries.
Attached is a patch that does what I want.
Thanks!
Jason
Subject: | cat-auth-store-kiokudb.diff |
diff --git a/Makefile.PL b/Makefile.PL
index 501f12d..e4ce194 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -5,7 +5,7 @@ all_from 'lib/Catalyst/Authentication/Store/KiokuDB.pm';
requires 'KiokuDB' => '0.07';
requires 'Catalyst::Plugin::Authentication';
-requires 'KiokuDB::Backend::BDB::GIN';
+recommends 'KiokuDB::Backend::BDB::GIN';
auto_install;
WriteAll;
diff --git a/lib/Catalyst/Authentication/Store/KiokuDB.pm b/lib/Catalyst/Authentication/Store/KiokuDB.pm
index 6a2d325..9e5d0d9 100644
--- a/lib/Catalyst/Authentication/Store/KiokuDB.pm
+++ b/lib/Catalyst/Authentication/Store/KiokuDB.pm
@@ -11,7 +11,6 @@ use Search::GIN::Extract::Attributes;
use Search::GIN::Extract::Multiplex;
use Search::GIN::Query::Attributes;
use KiokuDB;
-use KiokuDB::Backend::BDB::GIN;
sub new {
my ($class, $conf, $app, $realm) = @_;
@@ -21,6 +20,7 @@ sub new {
$self{kioku} = $conf->{kiokuObject};
}
elsif ($conf->{kiokuDir}) {
+ require KiokuDB::Backend::BDB::GIN;
$self{kioku} = KiokuDB->new(
backend => KiokuDB::Backend::BDB::GIN->new(
manager => { home => $conf->{kiokuDir}, create => 1 },