Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch when key is missing on input CSV file #4

Closed
pabloab opened this issue May 19, 2018 · 1 comment
Closed

Catch when key is missing on input CSV file #4

pabloab opened this issue May 19, 2018 · 1 comment

Comments

@pabloab
Copy link

pabloab commented May 19, 2018

As said on this StackOverflow answer, Text::CSV::Hashify (v0.08) doesn't take care of uninitialized variables, in particular when user give a key not present on first row of CSV:

Use of uninitialized value $kk in hash element at /usr/local/share/perl/5.22.1/Text/CSV/Hashify.pm line 303, <$IN> line 2.
Use of uninitialized value $kk in hash element at /usr/local/share/perl/5.22.1/Text/CSV/Hashify.pm line 307, <$IN> line 2.
Use of uninitialized value $kk in hash element at /usr/local/share/perl/5.22.1/Text/CSV/Hashify.pm line 309, <$IN> line 2.
Use of uninitialized value $kk in hash element at /usr/local/share/perl/5.22.1/Text/CSV/Hashify.pm line 303, <$IN> line 3.
Use of uninitialized value $kk in concatenation (.) or string at /usr/local/share/perl/5.22.1/Text/CSV/Hashify.pm line 304, <$IN> line 3.

Would be nice to catch the situation and die with a helpful message.

@jkeenan
Copy link
Owner

jkeenan commented May 22, 2018

Thanks for this report. rt.cpan.org is the preferred issue tracker for my CPAN distributions, so I'm transferring discussion there and closing this github issue.

By my analysis there are two problems: one of code, the other of documentation. They are respectively discussed in:
code: https://rt.cpan.org/Ticket/Display.html?id=125384
and
docs: https://rt.cpan.org/Ticket/Display.html?id=125385

Thank you very much.
Jim Keenan

@jkeenan jkeenan closed this as completed May 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants