From 7358571b41a1959461b53de83010443b4c9e12d1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Thu, 24 Feb 2011 11:41:50 +0100 Subject: [PATCH] Csv/Dispatcher: dynamisches $class require schon im Specbuilder. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit - Spart Zeit später - Kann abgefangen werden falls es Fehler gibt. --- SL/Helper/Csv/Dispatcher.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SL/Helper/Csv/Dispatcher.pm b/SL/Helper/Csv/Dispatcher.pm index 9626fed25..a8d29fe45 100644 --- a/SL/Helper/Csv/Dispatcher.pm +++ b/SL/Helper/Csv/Dispatcher.pm @@ -36,7 +36,6 @@ sub apply { if ($class) { # autovifify - eval "require $class; 1" or die "could not load class '$class'"; if (defined $index) { if (! $obj->$acc || !$obj->$acc->[$index]) { my @objects = $obj->$acc; @@ -101,6 +100,7 @@ sub make_spec { my $next_class = $cur_class->meta->relationship($step)->class; push @{ $spec->{steps} }, [ $step, $next_class, $index ]; $cur_class = $next_class; + eval "require $cur_class; 1" or die "could not load class '$cur_class'"; } } else { # simple dispatch push @{ $spec->{steps} }, [ $step ]; -- 2.20.1