summaryrefslogtreecommitdiffstats
path: root/scripts/apm.pl
diff options
context:
space:
mode:
authorObfuscoder2014-10-17 18:30:46 +0200
committerObfuscoder2014-10-24 19:27:38 +0200
commitd2b44a7bb135579368f93e7d4824480c000eaa64 (patch)
tree3bddc3d5ef008dbf6aa5cf909ffb180bebfe4544 /scripts/apm.pl
parentff9a44047a299bce4995c22fd6f15851e1b065ee (diff)
downloadscripts.irssi.org-d2b44a7bb135579368f93e7d4824480c000eaa64.tar.bz2
Fix perlcritic issues for all scripts starting with a
Diffstat (limited to 'scripts/apm.pl')
-rw-r--r--scripts/apm.pl10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/apm.pl b/scripts/apm.pl
index 1cf5a24..ec42c66 100644
--- a/scripts/apm.pl
+++ b/scripts/apm.pl
@@ -47,7 +47,7 @@ exit unless ($apm or $acpi);
sub get_apm {
- open(RC, "/proc/apm");
+ open(RC, q{<}, "/proc/apm");
my $line = <RC>;
close RC;
my ($ver1, $ver2, $sysstatus, $acstat, $chargstat, $batstatus, $prozent, $remain) = split(/\s/,$line);
@@ -56,13 +56,13 @@ sub get_apm {
}
sub get_acpi {
- open(RC, "/proc/acpi/ac_adapter/ACAD/state");
+ open(RC, q{<}, "/proc/acpi/ac_adapter/ACAD/state");
my $line = <RC>;
close RC;
my ($text,$state) = split (/:/,$line);
$state =~ s/\s//g;
- open (RC, "/proc/acpi/battery/BAT0/info");
+ open (RC, q{<}, "/proc/acpi/battery/BAT0/info");
my ($text,$capa,$ein);
while (my $line = <RC>) {
if ($line =~ /last full capacity/) {
@@ -70,7 +70,7 @@ sub get_acpi {
$capa =~ s/\s//g;
}
}
- open (RC, "/proc/acpi/battery/BAT0/state");
+ open (RC, q{<}, "/proc/acpi/battery/BAT0/state");
my ($text,$remain,$ein);
while (my $line = <RC>) {
if ($line =~ /remaining capacity/) {
@@ -95,7 +95,7 @@ sub power {
$pstate = get_acpi();
}
$item->default_handler($get_size_only, undef, "BAT:$pstate", 1 );
- }
+}
sub set_power {