diff options
Diffstat (limited to 'lib/Tools.pm')
| -rw-r--r-- | lib/Tools.pm | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/Tools.pm b/lib/Tools.pm index 6e2072d..a212216 100644 --- a/lib/Tools.pm +++ b/lib/Tools.pm @@ -177,16 +177,17 @@ sub con_err { my $console = shift; my $msg = shift; + if(ref $console) { + $console->{call} = 'message'; #reset default widget, avoid own widget + $console->err($msg); + } + if(ref $msg eq 'ARRAY') { - $msg = join('\n', @$msg); + $msg = join("\n", @$msg); } &_msg(501,$msg, 2); - if(ref $console) { - $console->{call} = 'message'; #reset default widget, avoid own widget - $console->err($msg); - } return undef; } @@ -197,17 +198,17 @@ sub con_msg { my $console = shift; my $msg = shift; - if(ref $msg eq 'ARRAY') { - $msg = join('\n', @$msg); - } - - &_msg(250,$msg, 4); - if(ref $console) { $console->{call} = 'message'; #reset default widget, avoid own widget $console->msg($msg); } + if(ref $msg eq 'ARRAY') { + $msg = join("\n", @$msg); + } + + &_msg(250,$msg, 4); + return undef; } |
