Skip to content

Commit

Permalink
Call config builder directly in script runner.
Browse files Browse the repository at this point in the history
  • Loading branch information
oalders committed Dec 8, 2016
1 parent 278bf0d commit b81f509
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/MetaCPAN/Script/Runner.pm
Expand Up @@ -18,9 +18,8 @@ sub run {
= map { ( my $key = $_ ) =~ s/^MetaCPAN::Script:://; lc($key) => $_ }
plugins;
die "Usage: metacpan [command] [args]" unless ($class);
Module::Runtime::require_module( $plugins{$class} );

my $config = $self->config;
my $config = $self->_build_config;

foreach my $logger ( @{ $config->{logger} || [] } ) {
my $path = $logger->{filename} or next;
Expand All @@ -29,6 +28,7 @@ sub run {
or File::Path::mkpath($path);
}

Module::Runtime::require_module( $plugins{$class} );
my $obj = $plugins{$class}->new_with_options;
$obj->run;
}
Expand Down

0 comments on commit b81f509

Please sign in to comment.