Revision a6372bfa
Von Bernd Bleßmann vor etwa 11 Jahren hinzugefügt
SL/Helper/Csv.pm | ||
---|---|---|
111 | 111 |
if (scalar @profile > 1) { |
112 | 112 |
# Each profile needs a class and a row_ident |
113 | 113 |
my $info_ok = all { defined $_->{class} && defined $_->{row_ident} } @profile; |
114 |
$self->_push_error([ |
|
115 |
0, |
|
116 |
"missing class or row_ident in one of the profiles for multiplexed data", |
|
117 |
0, |
|
118 |
0]) unless $info_ok; |
|
114 | 119 |
|
115 | 120 |
# If header is given, there need to be a header for each profile |
116 | 121 |
# and no empty headers. |
117 | 122 |
if ($info_ok && $self->header) { |
118 | 123 |
my @header = @{ $self->header }; |
119 |
$info_ok = $info_ok && scalar @profile == scalar @header; |
|
120 |
$info_ok = $info_ok && all { scalar @$_ > 0} @header; |
|
124 |
my $t_ok = scalar @profile == scalar @header; |
|
125 |
$self->_push_error([ |
|
126 |
0, |
|
127 |
"number of headers and number of profiles must be the same for multiplexed data", |
|
128 |
0, |
|
129 |
0]) unless $t_ok; |
|
130 |
$info_ok = $info_ok && $t_ok; |
|
131 |
|
|
132 |
$t_ok = all { scalar @$_ > 0} @header; |
|
133 |
$self->_push_error([ |
|
134 |
0, |
|
135 |
"no empty headers are allowed for multiplexed data", |
|
136 |
0, |
|
137 |
0]) unless $t_ok; |
|
138 |
$info_ok = $info_ok && $t_ok; |
|
121 | 139 |
} |
122 | 140 |
$self->is_multiplexed($info_ok); |
123 | 141 |
return $info_ok; |
Auch abrufbar als: Unified diff
_check_multiplexed setzt error im Fehlerfall.