]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Helper/Csv/Dispatcher.pm
Diverse Änderungen an RB-Vorlagen
[mfinanz.git] / SL / Helper / Csv / Dispatcher.pm
index cbcae0d82d87e192ecc362de02bac5235ff62537..be3faddd63d5561c78f5703c4511e6b8961f2879 100644 (file)
@@ -71,7 +71,15 @@ sub parse_profile {
 
   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);
@@ -85,6 +93,8 @@ sub make_spec {
   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)) {