+ #deal with broadsoft's awful non-standard CSV escaping :/
+ row_callback => sub {
+ my $line = shift;
+ $line = qq("$line"); # put " at the beginning and end
+ $line =~ s/(?<!\\),/","/g; # all commas not after a \ become ","
+ $line =~ s/\\,/,/g; # and now we can turn \, into ,
+ #XXX embedded \r and \n ? none in my test data, and might be better to
+ # leave escaped and deal with it from there?
+ $line =~ s/\\\\/\\/g; # undo double backslashes? none in my test data
+
+ #and now we have a properly formed CSV line
+ $line;
+ },
+