Revision 7358571b
Von Sven Schöling vor fast 14 Jahren hinzugefügt
SL/Helper/Csv/Dispatcher.pm | ||
---|---|---|
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;
|
||
... | ... | |
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 ];
|
Auch abrufbar als: Unified diff
Csv/Dispatcher: dynamisches $class require schon im Specbuilder.
- Spart Zeit später
- Kann abgefangen werden falls es Fehler gibt.