summaryrefslogtreecommitdiffstats
path: root/perl-install/commands.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-11-11 19:11:59 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-11-11 19:11:59 +0000
commitbfd84f6e2df1b083c8d95f6f8a84ede73d36dfea (patch)
tree42b0132d629d68fffde6b0e828126c18c0c3d1ed /perl-install/commands.pm
parent195f44c2da47b9f0df0461b593935d89619a5a0e (diff)
downloaddrakx-bfd84f6e2df1b083c8d95f6f8a84ede73d36dfea.tar
drakx-bfd84f6e2df1b083c8d95f6f8a84ede73d36dfea.tar.gz
drakx-bfd84f6e2df1b083c8d95f6f8a84ede73d36dfea.tar.bz2
drakx-bfd84f6e2df1b083c8d95f6f8a84ede73d36dfea.tar.xz
drakx-bfd84f6e2df1b083c8d95f6f8a84ede73d36dfea.zip
add or remove spaces where need to please perl_checker
Diffstat (limited to 'perl-install/commands.pm')
-rw-r--r--perl-install/commands.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/commands.pm b/perl-install/commands.pm
index e05c0c2db..6d478c283 100644
--- a/perl-install/commands.pm
+++ b/perl-install/commands.pm
@@ -41,11 +41,13 @@ sub getopts {
sub true { exit 0 }
sub false { exit 1 }
sub cat { @ARGV = @_; print while <> }
-sub which { ARG: foreach (@_) { foreach my $c (split /:/, $ENV{PATH}) { -x "$c/$_" and print("$c/$_\n"), next ARG }}}
sub dirname_ { print dirname(@_), "\n" }
sub basename_ { print basename(@_), "\n" }
sub rmdir_ { foreach (@_) { rmdir $_ or die "rmdir: can't remove $_\n" } }
sub lsmod { print "Module Size Used by\n"; cat("/proc/modules") }
+sub which {
+ ARG: foreach (@_) { foreach my $c (split /:/, $ENV{PATH}) { -x "$c/$_" and print("$c/$_\n"), next ARG }}
+}
sub grep_ {
my ($h, $v, $i) = getopts(\@_, qw(hvi));
@@ -102,7 +104,7 @@ sub mknod {
eval { devices::make($_[0]) }; $@ and die "mknod: failed to create $_[0]\n";
} elsif (@_ == 4) {
require c;
- my $mode = $ {{"b" => c::S_IFBLK(), "c" => c::S_IFCHR()}}{$_[1]} or die "unknown node type $_[1]\n";
+ my $mode = ${{ "b" => c::S_IFBLK(), "c" => c::S_IFCHR() }}{$_[1]} or die "unknown node type $_[1]\n";
syscall_('mknod', my $a = $_[0], $mode | 0600, makedev($_[2], $_[3])) or die "mknod failed: $!\n";
} else { die "usage: mknod <path> [b|c] <major> <minor> or mknod <path>\n" }
}
@@ -204,7 +206,7 @@ sub displaySize {
}
sub ls {
- my ($l , $h) = getopts(\@_, qw(lh));
+ my ($l, $h) = getopts(\@_, qw(lh));
$h and die "usage: ls [-l] <files...>\n";
@_ or @_ = '.';
@@ -309,7 +311,7 @@ sub strings {
while (<>) {
while (/[$printable_chars]{$n,}/og) {
printf "%07d ", ($l + length $') if $o;
- print "$&\n" ;
+ print "$&\n";
}
$l += length;
} continue { $l = 0 if eof }