summaryrefslogtreecommitdiffstats
path: root/perl-install/common.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-10-08 22:00:52 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-10-08 22:00:52 +0000
commitfc479b2a46849ffe42eb17a3162a38e27900fe93 (patch)
tree571baaa9ab25ea06b356db9ede64b51a0de5ae87 /perl-install/common.pm
parented6bcf695365fcf77850639267fa3c3633429d86 (diff)
downloaddrakx-fc479b2a46849ffe42eb17a3162a38e27900fe93.tar
drakx-fc479b2a46849ffe42eb17a3162a38e27900fe93.tar.gz
drakx-fc479b2a46849ffe42eb17a3162a38e27900fe93.tar.bz2
drakx-fc479b2a46849ffe42eb17a3162a38e27900fe93.tar.xz
drakx-fc479b2a46849ffe42eb17a3162a38e27900fe93.zip
no_comment
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r--perl-install/common.pm14
1 files changed, 9 insertions, 5 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index f2d458a26..9dc3e3c6a 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -359,11 +359,15 @@ sub typeFromMagic($@) {
local *F; sysopen F, $f, 0 or return;
my $tmp;
- foreach (@_) {
- my ($name, $offset, $signature) = @$_;
- sysseek(F, $offset, 0) or next;
- sysread(F, $tmp, length $signature);
- $tmp eq $signature and return $name;
+ M: foreach (@_) {
+ my ($name, @l) = @$_;
+ while (@l) {
+ my ($offset, $signature) = splice(@l, 0, 2);
+ sysseek(F, $offset, 0) or next M;
+ sysread(F, $tmp, length $signature);
+ $tmp eq $signature or next M;
+ }
+ return $name;
}
undef;
}