Revision 8269a977
Von Sven Schöling vor etwa 10 Jahren hinzugefügt
SL/Controller/CsvImport/Base.pm | ||
---|---|---|
$self->controller->raw_data_headers({ used => { }, headers => [ ] });
|
||
$self->controller->info_headers({ used => { }, headers => [ ] });
|
||
|
||
my @objects = $self->csv->get_objects;
|
||
my $objects = $self->csv->get_objects;
|
||
|
||
$self->controller->track_progress(progress => 70);
|
||
|
||
... | ... | |
|
||
$self->controller->track_progress(progress => 80);
|
||
|
||
$self->controller->data([ pairwise { { object => $a, raw_data => $b, errors => [], information => [], info_data => {} } } @objects, @raw_data ]);
|
||
$self->controller->data([ pairwise { { object => $a, raw_data => $b, errors => [], information => [], info_data => {} } } @$objects, @raw_data ]);
|
||
|
||
$self->controller->track_progress(progress => 90);
|
||
|
SL/Controller/CsvImport/BaseMulti.pm | ||
---|---|---|
$self->controller->raw_data_headers($raw_data_headers);
|
||
$self->controller->info_headers($info_headers);
|
||
|
||
my @objects = $self->csv->get_objects;
|
||
my $objects = $self->csv->get_objects;
|
||
|
||
$self->controller->track_progress(progress => 70);
|
||
|
||
... | ... | |
|
||
$self->controller->track_progress(progress => 80);
|
||
|
||
$self->controller->data([ pairwise { { object => $a, raw_data => $b, errors => [], information => [], info_data => {} } } @objects, @raw_data ]);
|
||
$self->controller->data([ pairwise { { object => $a, raw_data => $b, errors => [], information => [], info_data => {} } } @$objects, @raw_data ]);
|
||
|
||
$self->controller->track_progress(progress => 90);
|
||
|
SL/Helper/Csv.pm | ||
---|---|---|
croak 'must parse first' unless $self->_parsed;
|
||
|
||
$self->_make_objects unless $self->_objects;
|
||
return wantarray ? @{ $self->_objects } : $self->_objects;
|
||
return $self->_objects;
|
||
}
|
||
|
||
sub errors {
|
||
... | ... | |
|
||
my $status = $csv->parse;
|
||
my $hrefs = $csv->get_data;
|
||
my @objects = $csv->get_objects;
|
||
my $objects = $csv->get_objects;
|
||
|
||
my @errors = $csv->errors;
|
||
|
||
... | ... | |
|
||
Parse the data into objects and return those.
|
||
|
||
This method will return list or arrayref depending on context.
|
||
This method will return an arrayref of all objects.
|
||
|
||
=item C<get_data>
|
||
|
Auch abrufbar als: Unified diff
Csv: wantarray syntax entfernt.