5

I recently taught myself enough Perl to solve a real-world problem*. I'd like to share the scripts, but none of the resources I studied during development prepared me for distribution.

What I'm looking for is links to good info on common practice or standards for cross plattform Perl programs.

Such as (assuming usage on the three major OSes):

  1. How do we implement a neat and 'standard' command line interface?

    • Including good parameter naming and parsing
    • and help-flag / docs
  2. How should output and logging be handled? stdout? Plain text log file in some standard path? Plain text file in CWD? All of the above?

  3. Is there common standard for documenting / commenting Perl scripts?

  4. Are there any communities I could go to for getting feedback / mentoring on the script?

*specifically, I wrote Pidgin2Mail (source): a script that parses logs from the multi-protocol FOSS chat client Pidgin, converts them to well formed emails and submits to an inbox of your choice. I use it to keep all my chat logs available in gmail.

4

1 回答 1

8
  1. Getopt::Long与 Perl 捆绑在一起,是一个很好的起点。
  2. 打印到 STDOUT 或 STDERR 通常就足够了。Log::Log4perl是 800 磅的 Gorilla 解决方案。中间还有很多其他的,包括Log::Dispatch
  3. 是的,豆荚
  4. 佩尔蒙克斯
于 2014-02-10T12:24:41.473 回答