in reply to Low-threshold function in Text::CSV_XS

but should it be auto-exported?

Put it in @EXPORT_OK not in @EXPORT. Don't encourage non-self-documenting imports. It isn't a burden to type use Text::CSV_XS 'csv2list'; and the clarity provided to the next person reading the code is well worth it.

- tye        

Replies are listed 'Best First'.
Re^2: Low-threshold function in Text::CSV_XS (@EXPORT_OK)
by BrowserUk (Patriarch) on Jan 24, 2014 at 18:07 UTC
    It isn't a burden to type use Text::CSV_XS 'csv2list';

    Except for when using one liners. This:

    perl -MText::CSV -E"csv2list(...)"

    Is nicer than:

    perl -MText::CSV=cvs2list -E"csv2list(...)"

    (But then, I'd name the function just csv(). )


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      See App::CCSV for oneliners ... although it could use some help with interface (it should come with existing configs)

        This is not for applications or command-line-utilities. Text::CSV_XS already comes with examples and Spreadsheet::Read comes with xlscat which already fills the CL util gap. That is not my aim for now (though it can make CLI tools quite a lot easier when done right).


        Enjoy, Have FUN! H.Merijn