Revision 417cc3a7
Von Sven Schöling vor mehr als 13 Jahren hinzugefügt
SL/Helper/Csv/Dispatcher.pm | ||
---|---|---|
35 | 35 |
my ($acc, $class) = @$step; |
36 | 36 |
if ($class) { |
37 | 37 |
eval "require $class; 1" or die "could not load class '$class'"; |
38 |
$obj->$acc($class->new) if ! $$obj->$acc;
|
|
38 |
$obj->$acc($class->new) if ! $obj->$acc; |
|
39 | 39 |
$obj = $obj->$acc; |
40 | 40 |
} else { |
41 | 41 |
$obj->$acc($value); |
... | ... | |
74 | 74 |
for my $step ( split /\./, $path ) { |
75 | 75 |
if ($cur_class->can($step)) { |
76 | 76 |
if ($cur_class->meta->relationship($step)) { #a |
77 |
my $next_class = $cur_class->meta->relationsship($step)->class;
|
|
77 |
my $next_class = $cur_class->meta->relationship($step)->class; |
|
78 | 78 |
push @{ $spec->{steps} }, [ $step, $next_class ]; |
79 | 79 |
$cur_class = $next_class; |
80 | 80 |
} else { # simple dispatch |
Auch abrufbar als: Unified diff
One-To-One dispatch test.