for my $col (@$header) {
next unless $col;
- push @specs, $self->make_spec($col, $profile->{$col} || $col);
+ if ($self->_csv->strict_profile) {
+ if (exists $profile->{$col}) {
+ push @specs, $self->make_spec($col, $profile->{$col});
+ } else {
+ $self->unknown_column($col, undef);
+ }
+ } else {
+ push @specs, $self->make_spec($col, $profile->{$col} || $col);
+ }
}
$self->_specs(\@specs);
my $spec = { key => $col, steps => [] };
my $cur_class = $self->_csv->class;
+ return unless $cur_class;
+
for my $step_index ( split /\.(?!\d)/, $path ) {
my ($step, $index) = split /\./, $step_index;
if ($cur_class->can($step)) {