projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45119ea
)
Csv/Dispatcher: dynamisches $class require schon im Specbuilder.
author
Sven Schöling
<s.schoeling@linet-services.de>
Thu, 24 Feb 2011 10:41:50 +0000
(11:41 +0100)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Thu, 16 Jun 2011 06:44:05 +0000
(08:44 +0200)
- Spart Zeit später
- Kann abgefangen werden falls es Fehler gibt.
SL/Helper/Csv/Dispatcher.pm
patch
|
blob
|
history
diff --git
a/SL/Helper/Csv/Dispatcher.pm
b/SL/Helper/Csv/Dispatcher.pm
index
9626fed
..
a8d29fe
100644
(file)
--- 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 ];