Tux / Text-CSV_XS

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

Procedure (or method) returning the error text #33

Closed arnesom closed 3 years ago

arnesom commented 3 years ago

As the error codes are not very end-user friendly.

Either as a method (to be used instead of $csv->error_diag) or as a procedure wrapper (e.g.textual_error($csv->error_diag).

Tux commented 3 years ago

From the docs:

   error_diag
        Text::CSV_XS->error_diag ();
        $csv->error_diag ();
        $error_code               = 0  + $csv->error_diag ();
        $error_str                = "" . $csv->error_diag ();
        ($cde, $str, $pos, $rec, $fld) = $csv->error_diag ();

Do you now ask to make a new method to mimic the behavior of "".$csv->error_diag?

arnesom commented 3 years ago

Ah. I missed that section, and read "Diagnostics". Then I have what I need. Thank you for the help.