summaryrefslogtreecommitdiffstats
path: root/scripts/apm.pl
diff options
context:
space:
mode:
authorDavid Leadbeater2015-01-10 17:00:55 +0000
committerDavid Leadbeater2015-01-10 17:00:55 +0000
commit6fa0cda4b3f7d54d5835fe580795e4f35980cc28 (patch)
tree5f38704d7c9babab81a9c2b895efa2cbe968f178 /scripts/apm.pl
parentcbbdf2a1d93dbb64d3fb34346e9c57b14dfa2931 (diff)
parentd2b44a7bb135579368f93e7d4824480c000eaa64 (diff)
downloadscripts.irssi.org-6fa0cda4b3f7d54d5835fe580795e4f35980cc28.tar.bz2
Merge pull request #78 from obfuscoder/perlcritic-a
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 {