From e7ac04b23e5a184541f31d3f283f456b4c375a0c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Wed, 14 Sep 2011 12:39:55 +0200 Subject: [PATCH] =?utf8?q?Verhindern,=20dass=20Customvars=20bei=20zirkul?= =?utf8?q?=C3=A4ren=20Includes=20mehrfach=20registriert=20werden.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/Helper/CustomVariables.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SL/DB/Helper/CustomVariables.pm b/SL/DB/Helper/CustomVariables.pm index f56e4863e..6b7a5316a 100644 --- a/SL/DB/Helper/CustomVariables.pm +++ b/SL/DB/Helper/CustomVariables.pm @@ -22,7 +22,7 @@ sub import { $params{module} || $params{sub_module} or croak 'need param module or sub_module'; - save_meta_info($caller_package, %params); + return unless save_meta_info($caller_package, %params); make_cvar_accessor($caller_package, %params); make_cvar_alias($caller_package, %params) if $params{cvars_alias}; make_cvar_by_configs($caller_package, %params); @@ -36,6 +36,8 @@ sub save_meta_info { return 0 if $meta->{META_CVARS()}; $meta->{META_CVARS()} = \%params; + + return 1; } sub make_cvar_accessor { -- 2.20.1