mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-04-17 01:01:39 +08:00
Removed indirect object syntax from the modulino portion of pt-variable-advisor
This commit is contained in:
@@ -2831,7 +2831,7 @@ sub main {
|
|||||||
# ########################################################################
|
# ########################################################################
|
||||||
# Get configuration information.
|
# Get configuration information.
|
||||||
# ########################################################################
|
# ########################################################################
|
||||||
my $o = new OptionParser();
|
my $o = OptionParser->new();
|
||||||
$o->get_specs();
|
$o->get_specs();
|
||||||
$o->get_opts();
|
$o->get_opts();
|
||||||
|
|
||||||
@@ -2863,9 +2863,9 @@ sub main {
|
|||||||
# #########################################################################
|
# #########################################################################
|
||||||
# Load rules from POD and plugins.
|
# Load rules from POD and plugins.
|
||||||
# #########################################################################
|
# #########################################################################
|
||||||
my $p = new PodParser();
|
my $p = PodParser->new();
|
||||||
my $var = new VariableAdvisorRules(PodParser => $p);
|
my $var = VariableAdvisorRules->new(PodParser => $p);
|
||||||
my $adv = new Advisor(
|
my $adv = Advisor->new(
|
||||||
match_type => "bool",
|
match_type => "bool",
|
||||||
ignore_rules => $o->get('ignore-rules'),
|
ignore_rules => $o->get('ignore-rules'),
|
||||||
);
|
);
|
||||||
@@ -2882,8 +2882,8 @@ sub main {
|
|||||||
# #########################################################################
|
# #########################################################################
|
||||||
# Make common modules.
|
# Make common modules.
|
||||||
# #########################################################################
|
# #########################################################################
|
||||||
my $vp = new VersionParser();
|
my $vp = VersionParser->new();
|
||||||
my $trp = new TextResultSetParser();
|
my $trp = TextResultSetParser->new();
|
||||||
my %common_modules = (
|
my %common_modules = (
|
||||||
OptionParser => $o,
|
OptionParser => $o,
|
||||||
DSNParser => $dp,
|
DSNParser => $dp,
|
||||||
@@ -2913,13 +2913,13 @@ sub main {
|
|||||||
# ########################################################################
|
# ########################################################################
|
||||||
my $daemon;
|
my $daemon;
|
||||||
if ( $o->get('daemonize') ) {
|
if ( $o->get('daemonize') ) {
|
||||||
$daemon = new Daemon(o=>$o);
|
$daemon = Daemon->new(o=>$o);
|
||||||
$daemon->daemonize();
|
$daemon->daemonize();
|
||||||
MKDEBUG && _d('I am a daemon now');
|
MKDEBUG && _d('I am a daemon now');
|
||||||
}
|
}
|
||||||
elsif ( $o->get('pid') ) {
|
elsif ( $o->get('pid') ) {
|
||||||
# We're not daemoninzing, it just handles PID stuff.
|
# We're not daemoninzing, it just handles PID stuff.
|
||||||
$daemon = new Daemon(o=>$o);
|
$daemon = Daemon->new(o=>$o);
|
||||||
$daemon->make_PID_file();
|
$daemon->make_PID_file();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user