- if ($self->_csv->strict_profile) {
- if (exists $profile->{$col}) {
- push @specs, $self->make_spec($col, $profile->{$col}, $class);
- } else {
- $self->unknown_column($col, undef);
- }
+ if (exists $mapping->{$col} && $profile->{$mapping->{$col}}) {
+ push @specs, $self->make_spec($col, $profile->{$mapping->{$col}}, $class);
+ } elsif (exists $mapping->{$col}) {
+ push @specs, $self->make_spec($col, $mapping->{$col}, $class);
+ } elsif (exists $profile->{$col}) {
+ push @specs, $self->make_spec($col, $profile->{$col}, $class);