Perl cgi compilation error in autovivication.pm

I use a perl cgi script that uses our own libraries that use the pragma "no autovivification". For example.

/usr/lib/company/mysim.cgi:

#!/usr/bin/perl -w

use strict;
# ... other use
use Company::Module1;

/usr/lib/perl5/Company/Module1.pm

package Company::Module1;

no autovivification;
use strict;
use warnings;

In about 50% of cases, when accessing the URL to reach the cgi script, compilation fails with ...

[Fri Dec 04 15:40:10.744901 2015] [:error] [pid 30455:tid 2961136448] Bareword "A_HINT_STRICT" not allowed while "strict subs" in use at /usr/lib/i386-linux-gnu/perl5/5.20/autovivification.pm line 144.\nBareword "A_HINT_WARN" not allowed while "strict subs" in use at /usr/lib/i386-linux-gnu/perl5/5.20/autovivification.pm line 144.\nBareword "A_HINT_FETCH" not allowed while "strict subs" in use at /usr/lib/i386-linux-gnu/perl5/5.20/autovivification.pm line 144.\nBareword "A_HINT_STORE" not allowed while "strict subs" in use at /usr/lib/i386-linux-gnu/perl5/5.20/autovivification.pm line 144.\nBareword "A_HINT_EXISTS" not allowed while "strict subs" in use at /usr/lib/i386-linux-gnu/perl5/5.20/autovivification.pm line 144.\nBareword "A_HINT_DELETE" not allowed while "strict subs" in use at /usr/lib/i386-linux-gnu/perl5/5.20/autovivification.pm line 144.\nCompilation failed in require at /usr/lib/company/mysim.cgi line 14.\nBEGIN failed--compilation aborted at /usr/lib/company/mysim.cgi line 14.\n

(taken from / var / log / apache 2 / ssl / error.log, since this script is on the https port).

My environment: - debian jessie (8.2) - tomcat7 - apache2 (2.4) - perl 5.20.2 - libautovivification-perl 0.12-1 + b1

My questions:

  • Has anyone seen this before? It seems strange that the autosync module cannot be compiled due to the "correct" pragma.

  • - ? , cgi ~ (.. ) .

.

09/12/2015: ...

.

, apache, , -, .

XSLoader. , ...

package autovivification;

use 5.008_003;

use strict;
use warnings;

our $VERSION;
BEGIN {
 $VERSION = '0.12';
}

BEGIN {
 require XSLoader;
 XSLoader::load(__PACKAGE__, $VERSION);
}

my %bits = (
 strict => A_HINT_STRICT,
 warn   => A_HINT_WARN,
 fetch  => A_HINT_FETCH,
 store  => A_HINT_STORE,
 exists => A_HINT_EXISTS,
 delete => A_HINT_DELETE,
);

,

package autovivification;

use 5.008_003;

use strict;
use warnings;

our $VERSION;
BEGIN {
 $VERSION = '0.12';
}

#BEGIN {
# require XSLoader;
# XSLoader::load(__PACKAGE__, $VERSION);
#}

my %bits = (
 strict => A_HINT_STRICT,
 warn   => A_HINT_WARN,
 fetch  => A_HINT_FETCH,
 store  => A_HINT_STORE,
 exists => A_HINT_EXISTS,
 delete => A_HINT_DELETE,
);

.

, apache.... -.

.

16/12/2015: -

mod_perl, () apache 2.2 2.4. apache script, URL- ScriptAlias ​​/cgi-bin/script, URI/cgi-bin mod_perl. apache 2.2 , script mod_perl. apache 2.4 , script mod_perl.

- , script ( ) mod_perl. URI script to/somethingelse/script.

.

+4
1

mod_perl, () apache 2.2 2.4. apache script, URL- ScriptAlias ​​/cgi-bin/script, URI/cgi-bin mod_perl. apache 2.2 , script mod_perl. apache 2.4 script mod_perl.

- , script ( ) mod_perl. URI script to/somethingelse/script.  - HalfOpenedEye

+1

Source: https://habr.com/ru/post/1618615/


All Articles