From: Sven Schöling Date: Thu, 20 Jun 2013 16:46:33 +0000 (+0200) Subject: Zirkuläres Include zwischen SL::DBConnect und SL::DB aufbrechen X-Git-Tag: release-3.1.0beta1~290 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=6f741b430004136f7d233a5b41b717d42377dc4b;p=kivitendo-erp.git Zirkuläres Include zwischen SL::DBConnect und SL::DB aufbrechen --- diff --git a/SL/DB.pm b/SL/DB.pm index f5c408d3e..0adac9ca8 100644 --- a/SL/DB.pm +++ b/SL/DB.pm @@ -4,7 +4,6 @@ use strict; use Carp; use Data::Dumper; -use SL::DBConnect; use English qw(-no_match_vars); use Rose::DB; use Rose::DBx::Cache::Anywhere; @@ -19,6 +18,8 @@ my (%_db_registered); sub dbi_connect { shift; + # runtime require to break circular include + require SL::DBConnect; return SL::DBConnect->connect(@_); } @@ -37,6 +38,7 @@ sub _register_db { my $domain = shift; my $type = shift; + require SL::DBConnect; my %specific_connect_settings; my %common_connect_settings = ( driver => 'Pg',