Bug#650518: (Fwd) Re: Bug#650518: libproc-processtable-perl: Module expects english locale

gregor herrmann gregoa at debian.org
Fri Dec 16 20:04:59 UTC 2011


More info I received privately from the bug reporter:

----- Forwarded message -----

Hello Gregor,

I do my best to help you. Ask any question when you need some more information as I'm a little bit lost what to send you. 
But I'm not sure whether the bug report is a problem of Proc::ProcessTable. I tried something with the locale afterwards.

So, first that what I started with:

firma at nb000002:~$ uname -a
Linux nb000002 2.6.32-5-amd64 #1 SMP Thu Nov 3 03:41:26 UTC 2011 x86_64 GNU/Linux
firma at nb000002:~$ echo $LANG
de_DE.UTF-8
firma at nb000002:~$ ls file_does_not_exist
ls: Zugriff auf file_does_not_exist nicht möglich: Datei oder Verzeichnis nicht gefunden
firma at nb000002:~$ perl -e 'use Proc::ProcessTable; printf "%s\n",$Proc::ProcessTable::VERSION;'
0.45
firma at nb000002:~$ nl -ba ~/bin/ff
     1  #!/usr/bin/env perl
     2
     3  use Proc::ProcessTable;
     4  use strict;
     5  use warnings;
     6
     7  my $p = Proc::ProcessTable->new();
     8  my ( $ref, $pid, $cmd );
     9
    10  foreach $ref ( @{ $p->table } ) {
    11      $pid = $p->pid;
    12      $cmd = $p->cmdline;
    13      if ( $cmd =~ /firefox/ ) {
    14          printf( "Found %d / %s\n", $pid, $cmd );
    15      }
    16  }
    17

firma at nb000002:~$ ~/bin/ff
Your vendor has not defined Proc::ProcessTable macro pid at /home/firma/bin/ff line 11
firma at nb000002:~$ 

Afterwards I use the Perl debugger to find the problem. That's the way I found the problem.  I asked somebody what to do with this kind of information and he told me to send a bug report. So when you need it I can give you some ideas from Perl debug. IIRC what I found was an if ($! =~ /Invalid/) and for me this was the answer to my question why it didn't work as expected as the $OS_ERROR was in german.

Then my test to circumnavigate the problem I tried something different with line 2 use POSIX qw(locale.h);plus a new line 9 setlocale(LC_ALL, "C"); before the foreach-loop and a setting the old locale again after the loop. It works but differently than I'd have expected. The message is now different: Can't locate auto/Proc/ProcessTable/pid.al in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /home/firma/bin/ff line 11

I can confirm the error message. locate doesn't find pid.al file. May be something went wrong installing the module. The module is definitely from either debian or the backports repositories. There's no other possible source. I have never downloaded anything from CPAN or any other site on this computer and I don't fiddle around with the source. It's the first time I've used this module.

Thanks
Wolfgang

----- End forwarded message -----

-- 
 .''`.   Homepage: http://info.comodo.priv.at/ - OpenPGP key ID: 0x8649AA06
 : :' :  Debian GNU/Linux user, admin, & developer - http://www.debian.org/
 `. `'   Member of VIBE!AT & SPI, fellow of Free Software Foundation Europe
   `-    NP: Frank Zappa: AGENCY MAN (Studio Version)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20111216/1bcb10db/attachment.pgp>


More information about the pkg-perl-maintainers mailing list