Subject: | bug in DBD::CSV causes select to fail |
I was trying to use DBD::CSV 0.36 and got this error message:
DBD::CSV::st execute failed:
Execution ERROR: Can't call method "getline" on an undefined value at
/Library/Perl/5.12/DBD/CSV.pm line 433.
.
at /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level/DBI/DBD/SqlEngine.pm line
795
[for Statement "select * from stdin"] at /Users/bbooth/bin/dbdcsv line 98.
at /Users/bbooth/bin/dbdcsv line 98
I tracked down the problem to a bug in lines 424 and 434 of DBD/CSV.pm: $tbl->{csv_csv_in}-
Show quoted text
>getline should be changed to $attrs->{csv_csv_in}->getline. After applying this change,
DBD::CSV now works for me.