diff --git a/pandora_agents/win32/omnishell/omnishell_client.pl b/pandora_agents/win32/omnishell/omnishell_client.pl index 9132c90d5b..fe7f5696da 100644 --- a/pandora_agents/win32/omnishell/omnishell_client.pl +++ b/pandora_agents/win32/omnishell/omnishell_client.pl @@ -12,6 +12,14 @@ use warnings; use File::Basename; BEGIN { push @INC, '/usr/lib/perl5'; } + +# NOTE: The binary compiled with PAR::Packer for Pandora FMS doesn't work well +# with JSON:XS, probably because JSON::Backend::XS is defined in the __DATA__ +# section of JSON.pm and that doesn't work well with PAR::Filter. If this +# becomes a bottleneck, a workaround would be possible (e.g., redefining +# JSON::Backend::XS here). +BEGIN { $ENV{PERL_JSON_BACKEND} = 'JSON::PP' }; + use PandoraFMS::PluginTools; use PandoraFMS::Omnishell; @@ -90,4 +98,4 @@ if ($@) { exit 0; } -exit 0; \ No newline at end of file +exit 0;