Yunalescar
Yunalescar

Reputation: 60

Perl 5.14.2-7u21deb - Error with ConfigLocal.pm (Number found where operator expected)

i've been expiriencing a strange issue and can't figure out the cause.

I'm trying to check an ESXi Host with the Nagiosplugin check_esx3

Whenever i call the script, i get a proper return, but right before i get the Error as follows:

Number found where operator expected at /usr/local/lib/perl/5.14.2/Encode/ConfigLocal.pm line 13, near "$_ModLines_

1"
    (Missing semicolon on previous line?)

Since any other interaction with Perl runs into same scenario, it migt be something at the very basic. Unluckily im not tat familiar with Perl.

Trying to call "enc2xs -C" i get :

Number found where operator expected at /usr/local/lib/perl/5.14.2/Encode/ConfigLocal.pm line     13, near "$_ModLines_

1"
    (Missing semicolon on previous line?)
 require Encode;
 require Encode;
 require Encode::Symbol;
 require Encode::Byte;
 require Encode::Config;
 require Encode::Encoder;
 require Encode::EBCDIC;
 require Encode::Alias;
 require Encode::ConfigLocal;
Can't require Encode::ConfigLocal: Attempt to reload Encode/ConfigLocal.pm aborted.
Compilation failed in require at (eval 16) line 1.

Content of /usr/local/lib/perl/5.14.2/Encode/ConfigLocal.pm :

 #
 # Local demand-load module list
 #
 # You should not edit this file by hand!  use "enc2xs -C"
 #
 package Encode::ConfigLocal;
 our $VERSION = $_LocalVer_;

 use strict;

 $_ModLines_

 1;

Perlversion info:

  Built under linux
  Compiled at Sep 30 2013 03:45:34
  %ENV:
    PERL_LWP_SSL_VERIFY_HOSTNAME="0"
  @INC:
    /etc/perl
    /usr/local/lib/perl/5.14.2
    /usr/local/share/perl/5.14.2
    /usr/lib/perl5
    /usr/share/perl5
    /usr/lib/perl/5.14
    /usr/share/perl/5.14
    /usr/local/lib/site_perl
    .

Upvotes: 0

Views: 271

Answers (2)

Slaven Rezic
Slaven Rezic

Reputation: 4581

Just remove /usr/local/lib/perl/5.14.2/Encode/ConfigLocal.pm. It's optional (see the source code of Encode.pm, the require Encode::ConfigLocal is wrapped in an eval block) and not part of normal perl installations. enc2xs -C would create a new Encode::ConfigLocal, but apparently there's a bug which creates an invalid file. Anyway, unless you really think you need it, just remove it.

Upvotes: 1

Toto
Toto

Reputation: 91488

As said in the error message, a semicolon is missing on previous line:

package Encode::ConfigLocal;
our $VERSION = $_LocalVer_;

use strict;

$_ModLines_;
# here   __^

1;

Upvotes: 0

Related Questions