-
Notifications
You must be signed in to change notification settings - Fork 474
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
[perlcritic] fix some severity 4 issues #1051
base: master
Are you sure you want to change the base?
Conversation
I looked over perlcritic severity 4 warnings and like to ask what to do about the following warnings: fix or silence them? |
Pull Request Test Coverage Report for Build 2385
💛 - Coveralls |
f170c72
to
4ac0cd0
Compare
4ac0cd0
to
5478e5c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Globally adding another round of warning is a very good idea.
I'm just not convinced on all the rules :)
@@ -16,10 +16,11 @@ use Munin::Common::Utils qw( is_valid_hostname ); | |||
|
|||
use Params::Validate qw( :all ); | |||
use List::Util qw( first ); | |||
use Readonly; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I am a huge fan of that one as constant
is a core feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Far from knowing anything: Readonly
seems to be a core library and const
is a language feature, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Core library might be a little stretch. It's from CPAN.
Const is from a core lib.
Nothing is a language feature in term of const-ness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Core library might be a little stretch. It's from CPAN.
uh - OK - my misunderstanding of a local path.
In this case I would also tend to stick to the core feature set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cgzones: can we stick to const
or is there a good reason for Readonly
?
@@ -59,8 +59,6 @@ sub handle_request | |||
} | |||
} | |||
|
|||
package main; | |||
|
|||
$ENV{PATH} = '/usr/bin:/bin'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to revert to package main;
to obviously indicate that the above code was in a package.
It could be moved to another file, or the end of this one, but it all feels not as sweet as currently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cgzones: what do you think?
any comments? |
@steveschnepp: what do you think about cgzone's "fix or silence" question? |
I am trying to clean up a bit ... @cgzones: can we stick to |
No description provided.