From: Frank Brehm Date: Tue, 10 Aug 2010 13:26:32 +0000 (+0000) Subject: Bugfixing X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=9c85b2b7decccd577b2cba4f322b4819d5724ace;p=my-stuff%2Fperl.git Bugfixing git-svn-id: http://svn.brehm-online.com/svn/my-stuff/Perl@117 ec8d2aa5-1599-4edb-8739-2b3a1bc399aa --- diff --git a/lib/FrBr/Common/MooseX/Role/TestMode.pm b/lib/FrBr/Common/MooseX/Role/TestMode.pm index bfea557..2c2b8de 100644 --- a/lib/FrBr/Common/MooseX/Role/TestMode.pm +++ b/lib/FrBr/Common/MooseX/Role/TestMode.pm @@ -87,9 +87,11 @@ after 'evaluate_config' => sub { my $tmp = $self->testmode; } - for my $key ( keys %{ $self->config } ) { - my $val = $self->config->{$key}; - $self->testmode($val) if $key =~ /^test[_-]?mode$/i; + unless ( $self->used_cmd_params->{'testmode'} ) { + for my $key ( keys %{ $self->config } ) { + my $val = $self->config->{$key}; + $self->testmode($val) if $key =~ /^test[_-]?mode$/i; + } } }; diff --git a/lib/FrBr/Common/MooseX/Role/WithPidFile.pm b/lib/FrBr/Common/MooseX/Role/WithPidFile.pm index 06ca824..b8023e5 100644 --- a/lib/FrBr/Common/MooseX/Role/WithPidFile.pm +++ b/lib/FrBr/Common/MooseX/Role/WithPidFile.pm @@ -252,8 +252,12 @@ after 'evaluate_config' => sub { $self->debug( "Werte Konfigurationsdinge aus ..." ); for my $key ( keys %{ $self->config } ) { my $val = $self->config->{$key}; - $self->piddir($val) if $key =~ /^pid[_-]?dir$/i; - $self->pidfile($val) if $key =~ /^pid[_-]?file$/i; + unless ( $self->used_cmd_params->{'piddir'} ) { + $self->piddir($val) if $key =~ /^pid[_-]?dir$/i; + } + unless ( $self->used_cmd_params->{'pidfile'} ) { + $self->pidfile($val) if $key =~ /^pid[_-]?file$/i; + } } }