<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div><span>Hi Salvatore,</span></div><div><span><br></span></div><div><span>hmm, - some thinking process - yes, agreed. Thanks for explanation.</span></div><div><br><span></span></div><div><span>Best regards</span></div><div><span>Wolfgang</span></div><div><br></div> <div style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <font face="Arial" size="2"> <hr size="1"> <b><span style="font-weight:bold;">Von:</span></b> Salvatore Bonaccorso <carnil@debian.org><br> <b><span style="font-weight: bold;">An:</span></b> gregor herrmann <gregoa@debian.org>; 650518@bugs.debian.org <br><b><span style="font-weight: bold;">Cc:</span></b> 650518-submitter@bugs.debian.org <br> <b><span style="font-weight: bold;">Gesendet:</span></b> 15:07
Samstag, 17.Dezember 2011<br> <b><span style="font-weight: bold;">Betreff:</span></b> Bug#650518: (Fwd) Re: Bug#650518: libproc-processtable-perl: Module expects english locale<br> </font> <br>Hi Gregor and hi Wolfgang<br><br>On Fri, Dec 16, 2011 at 10:14:14PM +0100, gregor herrmann wrote:<br>> On Fri, 16 Dec 2011 21:05:59 +0000, Wolfgang Wilhelm wrote:<br>> <br>> > > $p->{pid} and $p->{cmndline} is probably cleaner.<br>> > Agreed. Is it cleaner in the perldoc part, too?<br><br>But I think this in the documentation because of this:<br><br>The elements of @{ $p->table } are Proc::ProcessTable *objects*, the<br>documentation to the table methods states:<br><br> table<br> Reads the process table and returns a reference to an array<br> of Proc::ProcessTable::Process objects. Attributes of a<br> process
object are returned by accessors named for the<br> attribute; for example, to get the uid of a process just do:<br><br> $process->uid<br><br> The priority and pgrp methods also allow values to be set,<br> since these are supported directly by internal perl<br> functions.<br><br>You see that e.g. by dumping with Data::Dumper:<br><br>---[ example ]---------------------------------------------------------<br>#!/usr/bin/perl<br><br>use strict;<br>use warnings;<br>use Proc::ProcessTable;<br>use Data::Dumper;<br><br>my $p = Proc::ProcessTable->new();<br>
<br>foreach $ref ( @{ $p->table } ) {<br> print Dumper($ref);<br>}<br>-----------------------------------------------------------------------<br><br>Now the $ref's are process objects, hashrefs blessed into<br>Proc::ProcessTable objects. I think thus the notation in documentation<br>of Proc::ProcessTable makes sense this way.<br><br>Well okay you *can* access the keys of $ref via $ref->{uid}, as this<br>is a hashreference, blessed into Proc::ProcessTable.<br><br>Do you agree?<br><br>Regards<br>Salvatore<br><br><br> </div> </div>
</div></body></html>