- my $type = $opt->{'format_types'}
- ? $opt->{'format_types'}{ $param->{'format'} }
- : '';
-
- unless ( $type ) {
- if ( $file =~ /\.(\w+)$/i ) {
- $type = lc($1);
- } else {
- #or error out???
- warn "can't parse file type from filename $file; defaulting to CSV";
- $type = 'csv';
- }
- $type = 'csv'
- if $opt->{'default_csv'} && $type ne 'xls';
- }
-
- my $header = $opt->{'format_headers'}
- ? $opt->{'format_headers'}{ $param->{'format'} }
- : 0;
-
- my $sep_char = $opt->{'format_sep_chars'}
- ? $opt->{'format_sep_chars'}{ $param->{'format'} }
- : ',';
-
- my $fixedlength_format =
- $opt->{'format_fixedlength_formats'}
- ? $opt->{'format_fixedlength_formats'}{ $param->{'format'} }
- : '';
-