]> wagnertech.de Git - kivitendo-erp.git/commitdiff
Code-Vereinfachung
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Fri, 16 Aug 2013 15:11:59 +0000 (17:11 +0200)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Mon, 25 Nov 2013 13:03:11 +0000 (14:03 +0100)
SL/Helper/Csv/Dispatcher.pm

index a744892c14bda100db2e6c69d4d6e5190be95335..a08a63397b38628f1f349856e691c8b71f208a72 100644 (file)
@@ -106,19 +106,13 @@ sub is_known {
 sub parse_profile {
   my ($self, %params) = @_;
 
-  my $profile;
-  my $class;
   my @specs;
 
+  my $csv_profile = $self->_csv->profile;
   my $i = 0;
   foreach my $header (@{ $self->_csv->header }) {
-    if ($self->_csv->profile) {
-      $profile = $self->_csv->profile->[$i]->{profile};
-      $class   = $self->_csv->profile->[$i]->{class};
-    }
-
-    my $spec = $self->_parse_profile(profile => $profile,
-                                     class   => $class,
+    my $spec = $self->_parse_profile(profile => $csv_profile->[$i]->{profile},
+                                     class   => $csv_profile->[$i]->{class},
                                      header  => $header);
     push @specs, $spec;
     $i++;