Bug#650518: (Fwd) Re: Bug#650518: libproc-processtable-perl: Module expects english locale
Wolfgang Wilhelm
wolfgang20121964 at yahoo.de
Sat Dec 17 20:20:01 UTC 2011
Hi Salvatore,
hmm, - some thinking process - yes, agreed. Thanks for explanation.
Best regards
Wolfgang
________________________________
Von: Salvatore Bonaccorso <carnil at debian.org>
An: gregor herrmann <gregoa at debian.org>; 650518 at bugs.debian.org
Cc: 650518-submitter at bugs.debian.org
Gesendet: 15:07 Samstag, 17.Dezember 2011
Betreff: Bug#650518: (Fwd) Re: Bug#650518: libproc-processtable-perl: Module expects english locale
Hi Gregor and hi Wolfgang
On Fri, Dec 16, 2011 at 10:14:14PM +0100, gregor herrmann wrote:
> On Fri, 16 Dec 2011 21:05:59 +0000, Wolfgang Wilhelm wrote:
>
> > > $p->{pid} and $p->{cmndline} is probably cleaner.
> > Agreed. Is it cleaner in the perldoc part, too?
But I think this in the documentation because of this:
The elements of @{ $p->table } are Proc::ProcessTable *objects*, the
documentation to the table methods states:
table
Reads the process table and returns a reference to an array
of Proc::ProcessTable::Process objects. Attributes of a
process object are returned by accessors named for the
attribute; for example, to get the uid of a process just do:
$process->uid
The priority and pgrp methods also allow values to be set,
since these are supported directly by internal perl
functions.
You see that e.g. by dumping with Data::Dumper:
---[ example ]---------------------------------------------------------
#!/usr/bin/perl
use strict;
use warnings;
use Proc::ProcessTable;
use Data::Dumper;
my $p = Proc::ProcessTable->new();
foreach $ref ( @{ $p->table } ) {
print Dumper($ref);
}
-----------------------------------------------------------------------
Now the $ref's are process objects, hashrefs blessed into
Proc::ProcessTable objects. I think thus the notation in documentation
of Proc::ProcessTable makes sense this way.
Well okay you *can* access the keys of $ref via $ref->{uid}, as this
is a hashreference, blessed into Proc::ProcessTable.
Do you agree?
Regards
Salvatore
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20111217/7ab67740/attachment.html>
More information about the pkg-perl-maintainers
mailing list