--- SysProfile.pm_orig.pm 2005-08-27 01:49:56.000000000 +0200
+++ SysProfile.pm 2009-07-21 18:06:40.000000000 +0200
@@ -39,6 +39,7 @@
}
my $raw = $fre || !$pro->{$typ} ? `$conf{bin} $typ` : $pro->{$typ};
my $hdr = '';
+ my $hdr2 = '';
for(split /\n/, $raw) {
next if m/^\s*$/ || m/^\w/;
if(m/^\s{4}\w/) {
@@ -46,6 +47,7 @@
$hdr =~ s/^\s+//;
$hdr =~ s/:.*$//;
$pro->{$typ}->{$hdr} = {};
+ $hdr2 = '';
} elsif(m/^\s{6}\w/) {
s/^\s+//;
s/\s+$//;
@@ -55,6 +57,16 @@
} else {
$pro->{$typ}->{$k} = $v;
}
+ } elsif(m/^\s{8}\w/ && m/:$/) {
+ $hdr2 = $_;
+ $hdr2 =~ s/^\s+//;
+ $hdr2 =~ s/:.*$//;
+ $pro->{$typ}->{$hdr}->{$hdr2} = {};
+ } elsif(m/^\s{10}\w/ && $hdr2) {
+ s/^\s+//;
+ s/\s+$//;
+ my($k,$v) = split /:\s+/;
+ $pro->{$typ}->{$hdr}->{$hdr2}->{$k} = $v;
}
}
return $pro->{$typ};