use Data::Dumper;
use English qw(-no_match_vars);
use Rose::DB;
-use SL::DB::Cache;
+use SL::DB::Helper::Cache;
use Scalar::Util qw(blessed);
use base qw(Rose::DB);
-__PACKAGE__->db_cache_class('SL::DB::Cache');
+__PACKAGE__->db_cache_class('SL::DB::Helper::Cache');
__PACKAGE__->use_private_registry;
my (%_db_registered);
+++ /dev/null
-package SL::DB::Cache;
-
-use strict;
-use warnings;
-
-use Carp;
-
-use parent qw(Rose::DB::Cache);
-
-sub prepare_db {
- my ($self, $db, $entry) = @_;
-
- if (!$entry->is_prepared) {
- # if this a dummy kivitendo dbh, don't try to actually prepare this.
- if ($db->type =~ /KIVITENDO_EMPTY/) {
- return;
- }
-
- $entry->prepared(1);
- }
-
- if (!$db->dbh->ping) {
- $db->dbh(undef);
- }
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-SL::DB::Cache - database handle caching for kivitendo
-
-=head1 DESCRIPTION
-
-This class provides database cache handling for kivitendo running
-under FastCGI. It's based on Rose::DBx::Cache::Anywhere.
-
-=head1 METHODS
-
-=head2 prepare_db( I<rose_db>, I<entry> )
-
-Overrides default method to always ping() dbh.
--- /dev/null
+package SL::DB::Helper::Cache;
+
+use strict;
+use warnings;
+
+use Carp;
+
+use parent qw(Rose::DB::Cache);
+
+sub prepare_db {
+ my ($self, $db, $entry) = @_;
+
+ if (!$entry->is_prepared) {
+ # if this a dummy kivitendo dbh, don't try to actually prepare this.
+ if ($db->type =~ /KIVITENDO_EMPTY/) {
+ return;
+ }
+
+ $entry->prepared(1);
+ }
+
+ if (!$db->dbh->ping) {
+ $db->dbh(undef);
+ }
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+SL::DB::Helper::Cache - database handle caching for kivitendo
+
+=head1 DESCRIPTION
+
+This class provides database cache handling for kivitendo running
+under FastCGI. It's based on Rose::DBx::Cache::Anywhere.
+
+=head1 METHODS
+
+=head2 prepare_db( I<rose_db>, I<entry> )
+
+Overrides default method to always ping() dbh.