+
+ return $obj;
+}
+
+sub _class_by_line {
+ my ($self, $line) = @_;
+
+ # initialize lookup hash if not already done
+ if ($self->_csv->is_multiplexed && ! defined $self->_row_class ) {
+ $self->_row_class({ map { $_->{row_ident} => $_->{class} } @{ $self->_csv->profile } });
+ }
+
+ if ($self->_csv->is_multiplexed) {
+ return $self->_row_class->{$line->{datatype}};
+ } else {
+ return $self->_csv->profile->[0]->{class};
+ }
+}
+
+sub _specs_by_line {
+ my ($self, $line) = @_;
+
+ # initialize lookup hash if not already done
+ if ($self->_csv->is_multiplexed && ! defined $self->_row_spec ) {
+ $self->_row_spec({ pairwise { no warnings 'once'; $a->{row_ident} => $b } @{ $self->_csv->profile }, @{ $self->_specs } });
+ }
+
+ if ($self->_csv->is_multiplexed) {
+ return $self->_row_spec->{$line->{datatype}};
+ } else {
+ return $self->_specs->[0];
+ }