Delay loading required non-core modules and let pt-agent check for them manually.

This commit is contained in:
Daniel Nichter
2013-06-15 12:23:04 -07:00
parent e37bd32396
commit 5be7c252b8
3 changed files with 53 additions and 32 deletions

View File

@@ -26,10 +26,12 @@ use warnings FATAL => 'all';
use English qw(-no_match_vars);
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
use LWP;
use JSON;
eval {
use LWP;
use JSON;
};
use Scalar::Util qw(blessed);
use English qw(-no_match_vars);
use Lmo;
use Percona::Toolkit;

View File

@@ -20,7 +20,9 @@
{
package Percona::WebAPI::Representation;
use JSON;
eval {
use JSON;
};
require Exporter;
our @ISA = qw(Exporter);