Text-CSV icon indicating copy to clipboard operation
Text-CSV copied to clipboard

Usage example in error message incomplete. Just warn about undef instead.

Open jidanni opened this issue 4 years ago • 0 comments

$ cat e
use Text::CSV qw( csv );
my $aoa;
csv (in => $aoa, out => "file.csv");
$ perl -w e
usage: my $aoa = csv (in => $file); at e line 3.

Here according to the usage message, it looks like "in" can only be used with files. But in fact it can be used with much more.

The problem is an undef $aoa. So it should in fact warn about that instead.

jidanni avatar Mar 01 '21 04:03 jidanni