ok (1, "Test auto_diag"); $csv = Text::CSV.new (:auto_diag); { my @warn; local $SIG{__WARN__} = sub { push @warn, @_ }; is ($csv.{_RECNO}, 0, "No records read yet"); is ($csv.parse ('"","'), 0, "1 - bad parse"); ok (@warn == 1, "1 - One error"); like ($warn[0], qr '^# CSV ERROR: 2027 -', "1 - error message"); is ($csv.{_RECNO}, 1, "One record read"); } { my @warn; local $SIG{__WARN__} = sub { push @warn, @_ }; is ($csv.diag_verbose (3), 3, "Set diag_verbose"); is ($csv.parse ('"","'), 0, "1 - bad parse"); ok (@warn == 1, "1 - One error"); @warn = split m/\n/ => $warn[0]; ok (@warn == 3, "1 - error plus two lines"); like ($warn[0], qr '^# CSV ERROR: 2027 -', "1 - error message"); like ($warn[1], qr '^"","', "1 - input line"); like ($warn[2], qr '^ \^', "1 - position indicator"); is ($csv.{_RECNO}, 2, "Another record read"); }

done-testing;

1 POD Error

The following errors were encountered while parsing the POD:

Around line 152:

Unknown directive: =finish