New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perl Critic on eg/ #5

wants to merge 4 commits into
base: master


None yet
2 participants

kaoru commented Feb 23, 2015

If you're going to give an example, might as well make it exemplar :-)

If I was going all out I would have used Getopt::Long and Pod::Usage to make a real script out of it, but I decided to just address the basic Perl::Critic complaints about it. contains a lot of Perl::Critic violations too, but I'm too afraid to change anything lest the Perl 5.6 support be broken. I tried installing Perl 5.6 using perlbrew but compilation failed. Shame.


This comment has been minimized.


maddingue commented May 16, 2016

Thanks for your contribution, but I quite disagree. eg/ is just an example script, not a generic logging program like logger(1). It's merely the synopsis code put in a file, with very minimal arguments parsing so someone can poke at using Sys::Syslog.

Regarding each of your patches:

  • "Code before warnings" — applied.
  • "Magic punctuation variables ($0, $!)" — AFAIK, English use is discouraged by the official documentation since the beginnings of Perl 5.
  • "Quotes used with a string containing no non-whitespace characters" — I fail to see how this is more readable.
  • "String delimiter used with split" — in terms of readability, especially by a newcomer, I sincerely don't think m{/}msxis more readable than "/".

@maddingue maddingue closed this May 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment