summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-04-24 19:15:13 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-04-24 19:15:13 +0000
commita8c17fafaed296f970c218cec4ffe3ba72a9cb7d (patch)
tree4d9745497fbc388783198c75647cdfb3f35318d9
parent8c10b45b309f489da1d21e7508b91082ed9f52db (diff)
downloadperl-MDK-Common-a8c17fafaed296f970c218cec4ffe3ba72a9cb7d.tar
perl-MDK-Common-a8c17fafaed296f970c218cec4ffe3ba72a9cb7d.tar.gz
perl-MDK-Common-a8c17fafaed296f970c218cec4ffe3ba72a9cb7d.tar.bz2
perl-MDK-Common-a8c17fafaed296f970c218cec4ffe3ba72a9cb7d.tar.xz
perl-MDK-Common-a8c17fafaed296f970c218cec4ffe3ba72a9cb7d.zip
perl_checker adaptations
-rw-r--r--MDK/Common/System.pm6
-rw-r--r--MDK/Common/Various.pm4
2 files changed, 5 insertions, 5 deletions
diff --git a/MDK/Common/System.pm b/MDK/Common/System.pm
index de14ddf..686fcbe 100644
--- a/MDK/Common/System.pm
+++ b/MDK/Common/System.pm
@@ -245,7 +245,7 @@ sub list_skels {
grep { -d $_ && -w $_ } map { "$prefix$_/$suffix" } '/etc/skel', '/root', list_home();
}
-sub list_users {
+sub list_users() {
map { 500 < $_->[2] && $_->[0] ne "nobody" ? $_->[0] : () } list_passwd();
}
@@ -269,11 +269,11 @@ sub df {
map { $_ * ($blocksize / 1024) } $size, $free;
}
-sub sync { syscall_('sync') }
+sub sync() { syscall_('sync') }
sub psizeof { length pack $_[0] }
sub availableMemory() { MDK::Common::Math::sum(map { /(\d+)/ } grep { /^(MemTotal|SwapTotal):/ } MDK::Common::File::cat_("/proc/meminfo")) }
sub availableRamMB() { 4 * MDK::Common::Math::round((-s '/proc/kcore') / 1024 / 1024 / 4) }
-sub gettimeofday { my $t = pack "LL"; syscall_('gettimeofday', $t, 0) or die "gettimeofday failed: $!\n"; unpack("LL", $t) }
+sub gettimeofday() { my $t = pack "LL"; syscall_('gettimeofday', $t, 0) or die "gettimeofday failed: $!\n"; unpack("LL", $t) }
sub unix2dos { local $_ = $_[0]; s/\015$//mg; s/$/\015/mg; $_ }
diff --git a/MDK/Common/Various.pm b/MDK/Common/Various.pm
index 88db031..2abbb14 100644
--- a/MDK/Common/Various.pm
+++ b/MDK/Common/Various.pm
@@ -115,7 +115,7 @@ sub text2bool { my $t = lc($_[0]); $t eq "true" || $t eq "yes" ? 1 : 0 }
sub chomp_ { my @l = map { my $l = $_; chomp $l; $l } @_; wantarray() ? @l : $l[0] }
-sub backtrace {
+sub backtrace() {
my $s;
for (my $i = 1; caller($i); $i++) {
my ($_package, $file, $line, $func) = caller($i);
@@ -128,7 +128,7 @@ sub internal_error {
die "INTERNAL ERROR: $_[0]\n" . backtrace();
}
-sub noreturn {
+sub noreturn() {
if (defined wantarray()) {
my ($_package, $file, $line, $func) = caller(1);
my (undef, undef, undef, $func2) = caller(2);