Qgoda/Command/Xgettext.pm untested

filter: Statementstmt 0.0% 0 / 29 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 40 CC 2 SCAR 11.0
CC
2
Cov
0%
run
6.0
_displayHelp
2.0
BEGIN
2.0
CRAP 3.0
1 #! /bin/false
2  
3 # Copyright (C) 2016-2018 Guido Flohr <guido.flohr@cantanea.com>,
4 # all rights reserved.
5  
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
10  
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15  
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18  
19 package Qgoda::Command::Xgettext;
20 $Qgoda::Command::Xgettext::VERSION = 'v0.9.2';
21 use strict;
22  
23 use Qgoda;
24 use Qgoda::Locale::XGettext;
25 use Qgoda::Util qw(empty);
26  
27 use base 'Qgoda::Command';
28  
29 sub run {
30 my ($self, $args, $global_options) = @_;
31  
32 $global_options->{quiet} = 1;
33 delete $global_options->{verbose};
34 $global_options->{log_stderr} = 1;
35  
36 my $xgettext = Qgoda::Locale::XGettext->newFromArgv($args);
37  
38 my $srcdir = $xgettext->option('srcdir');
39 $xgettext->setOption(srcdir => '..') if empty $srcdir;
40  
41 $xgettext->run->output;
42  
43 return $self;
44 }
45  
46 sub _displayHelp {
47 my ($self) = @_;
48  
49 Qgoda::Locale::XGettext->newFromArgv(['--help']);
50 }
51  
52 1;