Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

"Fixing" perlcritic

  • Loading branch information...
commit 6aebbdcc88ddbb1d779b112d950cfebc7ab86d61 1 parent f33b528
@creaktive authored
Showing with 15 additions and 2 deletions.
  1. +13 −0 perlcritic.rc
  2. +2 −2 rainbarf
View
13 perlcritic.rc
@@ -0,0 +1,13 @@
+severity = harsh
+
+[TestingAndDebugging::RequireUseWarnings]
+equivalent_modules = common::sense
+
+[TestingAndDebugging::RequireUseStrict]
+equivalent_modules = common::sense
+
+[Modules::ProhibitModuleShebang]
+severity = gentle
+
+[Subroutines::ProhibitExcessComplexity]
+max_mccabe = 30
View
4 rainbarf
@@ -315,11 +315,11 @@ sub memory {
: ( lc chr ord $2 => $3)
) : ();
} <$meminfo>;
+ close $meminfo;
$m{c} -= delete $m{sc};
delete $m{c} if $m{c} < 0;
$m{w} = delete($m{t}) - sum values %m;
$m{x} = delete($m{st}) - delete($m{sf});
- close $meminfo;
} elsif (-x q{/usr/bin/vm_stat}) {
# fallback
%m = map {
@@ -391,7 +391,7 @@ sub battery {
my $fh;
if (open $fh, q(<), $uevent) {
while (<$fh>) {
- my ($key, $value) = /^POWER_SUPPLY_([^=]+)=(.*)$/;
+ my ($key, $value) = /^POWER_SUPPLY_([^=]+)=(.*)$/x;
next unless defined $key;
$key =~ y/A-Z/a-z/;
$battery{$key} = $value;
Please sign in to comment.
Something went wrong with that request. Please try again.