Tux / Text-CSV_XS

perl5 module for composition and decomposition of comma-separated values
17 stars 20 forks source link

Turn off column naming munging #35

Closed briandfoy closed 3 years ago

briandfoy commented 3 years ago

I wanted to turn off column name munging, and ended up with:

$csv->header( $fh, { munge_column_names => sub { $_[0] } } );

Aside from noting that lc is the default, I'd like another special value, perhaps undef or any false, to turn off any processing:

$csv->header( $fh, { munge_column_names => undef } );

Not a big deal and there's no urgency.

Tux commented 3 years ago

https://github.com/Tux/Text-CSV_XS/blob/master/doc/CSV_XS.md#options

Describes

The following values are available:

  lc     - lower case
  uc     - upper case
  db     - valid DB field names
  none   - do not change
  \%hash - supply a mapping
  \&cb   - supply a callback

So, "none" is what you are looking for. I'll consider making undef behave the same.

briandfoy commented 3 years ago

Oh, completely missed none, which would be fine.