Skip Menu |

This queue is for tickets about the Mac-SysProfile CPAN distribution.

Report information
The Basics
Id: 48059
Status: resolved
Priority: 0/
Queue: Mac-SysProfile

People
Owner: Nobody in particular
Requestors: adadov [...] adadov.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.02
Fixed in: 0.03



Subject: Some values are not read
You can find a "patch" here : http://paste.debian.net/42295/ but this patch won't fix everything There is many values on a Mac OS 10.5.7 which are not read by Mac-SysProfile
--- 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};
This Bug is really important for me, I'm blocked in another development using this module. I may fork it if there is no reply quite soon.
thanks, I'll try to have a look and update the case by tonight. If you have any tests to add and/or an example of the problem/list of items it misses that'd be excellent.
From: adadov [...] adadov.net
You can look for the Memory values or Storages like SATA and PATA which can't be read by the actual version because there is 6 or 8 spaces before datas.
Sorry last night was a wash, I'll try again today and tomorrow, thanks!
Sorry to leave you all hanging. I'll try again tonight or tomorrow, haven't forgotten about you :) thanks