File Coverage

blib/lib/App/gimpgitbuild/Command/env.pm
Criterion Covered Total %
statement 17 27 62.9
branch n/a
condition 0 2 0.0
subroutine 6 10 60.0
pod 4 4 100.0
total 27 43 62.7


line stmt bran cond sub pod time code
1             package App::gimpgitbuild::Command::env;
2             $App::gimpgitbuild::Command::env::VERSION = '0.32.1';
3 1     1   276833 use strict;
  1         3  
  1         44  
4 1     1   6 use warnings;
  1         2  
  1         68  
5 1     1   23 use 5.014;
  1         6  
6              
7 1     1   533 use App::gimpgitbuild -command;
  1         2  
  1         7  
8              
9 1     1   7135 use Path::Tiny qw/ path tempdir tempfile cwd /;
  1         10424  
  1         69  
10              
11 1     1   451 use App::gimpgitbuild::API::GitBuild ();
  1         5  
  1         276  
12              
13             sub description
14             {
15 0     0 1   return "set the environment for building GIMP-from-git";
16             }
17              
18             sub abstract
19             {
20 0     0 1   return shift->description();
21             }
22              
23             sub opt_spec
24             {
25 0     0 1   return ();
26              
27              
28             }
29              
30             sub execute
31             {
32 0     0 1   my ( $self, $opt, $args ) = @_;
33              
34 0           my $output_fn = $opt->{output};
35 0   0       my $exe = $opt->{exec} // [];
36              
37 0           my $obj = App::gimpgitbuild::API::GitBuild->new;
38              
39 0           my $env = $obj->new_env;
40 0           print <<"EOF";
41             export PATH="$env->{PATH}" ;
42             export PKG_CONFIG_PATH="$env->{PKG_CONFIG_PATH}" ;
43             export XDG_DATA_DIRS="$env->{XDG_DATA_DIRS}" ;
44             EOF
45              
46 0           return;
47             }
48              
49             1;
50              
51             __END__