<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Toomas,<br>
Both PCs are wheezy (Linux ... 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2
x86_64 GNU/Linux)<br>
<br>
"file"-versions:<br>
works correctly: 5.11-2+deb7u<b>1</b> <br>
doesn't work: 5.11-2+deb7u<b>2</b> <br>
<br>
Most likely the problem is due to the BEGIN { ...} block which is
in the opening of the respective perl-scripts.<br>
( see
<a class="moz-txt-link-freetext" href="http://perldoc.perl.org/perlmod.html#BEGIN%2c-UNITCHECK%2c-CHECK%2c-INIT-and-END">http://perldoc.perl.org/perlmod.html#BEGIN%2c-UNITCHECK%2c-CHECK%2c-INIT-and-END</a>
for explanation)<br>
--------------<br>
<small>#!/usr/bin/perl -w<br>
use strict;<br>
<br>
<b>BEGIN {</b><b><br>
</b><b> if ( !$ENV{'PERL_MODULES'} ) {</b><b><br>
</b><b> $ENV{'PERL_MODULES'}= '/srv/fai/config/perl_modules';</b><b><br>
</b><b> }</b><b><br>
</b><b> unshift @INC, $ENV{'PERL_MODULES'};</b><b><br>
</b><b>}</b><br>
<br>
use FAI;<br>
use NFS::Clients;<br>
<br>
....</small><br>
--------------<br>
<br>
When I removed the BEGIN { ...} block, "file" recognizes the script
correctly.<br>
<br>
I'll try to replace this block and I will make a bug report.<br>
<br>
Regards<br>
René<br>
<br>
<br>
<div class="moz-cite-prefix">On 03/21/2014 12:27 PM, Toomas Tamm
wrote:<br>
</div>
<blockquote
cite="mid:1395401279.12348.179.camel@agricola.yki.ttu.ee"
type="cite">
<pre wrap="">Hello,
(1) I can not reproduce this. What is your exact version of "file"
according to dpkg? Mine is 5.11-2+deb7u2 (my Debian is wheezy).
$ cat test
#!/usr/bin/perl -w
print "Hello World\n";
$ file test
test: Perl script, ASCII text executable
(2) Could it be something specific in your script? Try deleting parts of
the script (in a copy, of course) and see if "file" starts detecting
correctly after some specific part of the script is gone.
If you can show what exactly causes it, you may file a bug against
"file" in Debian BTS.
Toomas
On Fri, 2014-03-21 at 12:06 +0100, René Bleisch wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi,
Apparently, something went amiss with the linux "file" command since
it was last updated in apt... (last week or so)
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
</body>
</html>