Revision 8269a977
Von Sven Schöling vor etwa 10 Jahren hinzugefügt
SL/Controller/CsvImport/Base.pm | ||
---|---|---|
59 | 59 |
$self->controller->raw_data_headers({ used => { }, headers => [ ] }); |
60 | 60 |
$self->controller->info_headers({ used => { }, headers => [ ] }); |
61 | 61 |
|
62 |
my @objects = $self->csv->get_objects;
|
|
62 |
my $objects = $self->csv->get_objects;
|
|
63 | 63 |
|
64 | 64 |
$self->controller->track_progress(progress => 70); |
65 | 65 |
|
... | ... | |
67 | 67 |
|
68 | 68 |
$self->controller->track_progress(progress => 80); |
69 | 69 |
|
70 |
$self->controller->data([ pairwise { { object => $a, raw_data => $b, errors => [], information => [], info_data => {} } } @objects, @raw_data ]); |
|
70 |
$self->controller->data([ pairwise { { object => $a, raw_data => $b, errors => [], information => [], info_data => {} } } @$objects, @raw_data ]);
|
|
71 | 71 |
|
72 | 72 |
$self->controller->track_progress(progress => 90); |
73 | 73 |
|
SL/Controller/CsvImport/BaseMulti.pm | ||
---|---|---|
70 | 70 |
$self->controller->raw_data_headers($raw_data_headers); |
71 | 71 |
$self->controller->info_headers($info_headers); |
72 | 72 |
|
73 |
my @objects = $self->csv->get_objects;
|
|
73 |
my $objects = $self->csv->get_objects;
|
|
74 | 74 |
|
75 | 75 |
$self->controller->track_progress(progress => 70); |
76 | 76 |
|
... | ... | |
78 | 78 |
|
79 | 79 |
$self->controller->track_progress(progress => 80); |
80 | 80 |
|
81 |
$self->controller->data([ pairwise { { object => $a, raw_data => $b, errors => [], information => [], info_data => {} } } @objects, @raw_data ]); |
|
81 |
$self->controller->data([ pairwise { { object => $a, raw_data => $b, errors => [], information => [], info_data => {} } } @$objects, @raw_data ]);
|
|
82 | 82 |
|
83 | 83 |
$self->controller->track_progress(progress => 90); |
84 | 84 |
|
SL/Helper/Csv.pm | ||
---|---|---|
77 | 77 |
croak 'must parse first' unless $self->_parsed; |
78 | 78 |
|
79 | 79 |
$self->_make_objects unless $self->_objects; |
80 |
return wantarray ? @{ $self->_objects } : $self->_objects;
|
|
80 |
return $self->_objects; |
|
81 | 81 |
} |
82 | 82 |
|
83 | 83 |
sub errors { |
... | ... | |
360 | 360 |
|
361 | 361 |
my $status = $csv->parse; |
362 | 362 |
my $hrefs = $csv->get_data; |
363 |
my @objects = $csv->get_objects;
|
|
363 |
my $objects = $csv->get_objects;
|
|
364 | 364 |
|
365 | 365 |
my @errors = $csv->errors; |
366 | 366 |
|
... | ... | |
421 | 421 |
|
422 | 422 |
Parse the data into objects and return those. |
423 | 423 |
|
424 |
This method will return list or arrayref depending on context.
|
|
424 |
This method will return an arrayref of all objects.
|
|
425 | 425 |
|
426 | 426 |
=item C<get_data> |
427 | 427 |
|
Auch abrufbar als: Unified diff
Csv: wantarray syntax entfernt.