makamaka / Text-CSV

comma-separated values manipulator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Man page: also mention how to read from a a string

jidanni opened this issue · comments

Currently the Text::CSV man page only mentions how to get input from files.

However, other man pages show more ways,

         $dom = XML::LibXML->load_xml(
             location => $file_or_url
             # parser options ...
           );
         $dom = XML::LibXML->load_xml(
             string => $xml_string
             # parser options ...
           );
         $dom = XML::LibXML->load_xml(
             string => (\$xml_string)
             # parser options ...
           );
         $dom = XML::LibXML->load_xml({
             IO => $perl_file_handle
             # parser options ...
           );
         $dom = $parser->load_xml(...);

Therefore it would be great if the Text::CSV man page mentioned ways to read from a string, etc. which may be needed if preprocessing is necessary, e.g., to strip comments for #54.
Or say "Text::CSV cannot read from a string, as we need to seek() ..."

Currently there is

    in

       Used to specify the source.  "in" can be a file name (e.g. "file.csv"),
       which will be  opened for reading  and closed when finished,  a file
       handle (e.g.  $fh or "FH"),  a reference to a glob (e.g. "\*ARGV"),
       the glob itself (e.g. *STDIN), or a reference to a scalar (e.g.
       "\q{1,2,"csv"}").

But none of that seems useful for the problem at hand.
P.S., do add an example of using "\q{1,2,"csv"}".