Removed indirect object syntax from the modulino portion of pt-variable-advisor

This commit is contained in:
Brian Fraser
2011-12-26 12:03:21 -03:00
parent ac6789352a
commit 2c9a0e8cbd

View File

@@ -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();
} }