File Coverage

blib/lib/App/DuckPAN/Cmd/Env/Cmd/Get.pm
Criterion Covered Total %
statement 6 11 54.5
branch 0 4 0.0
condition n/a
subroutine 2 3 66.6
pod 0 1 0.0
total 8 19 42.1


line stmt bran cond sub pod time code
1             package App::DuckPAN::Cmd::Env::Cmd::Get;
2             our $AUTHORITY = 'cpan:DDG';
3             # ABSTRACT: Gets the specified env variable
4             $App::DuckPAN::Cmd::Env::Cmd::Get::VERSION = '1019';
5 1     1   920 use Moo;
  1         2  
  1         5  
6             with qw( App::DuckPAN::Cmd::Env::Cmd );
7              
8 1     1   272 use MooX::Options protect_argv => 0;
  1         2  
  1         6  
9              
10             sub run {
11 0     0 0   my ($self, $name) = @_;
12 0 0         $self->env->help("<name>") if !$name;
13 0           my $data = $self->env->load_env_ini;
14 0           $name = uc $name;
15 0 0         $data->{$name} ? $self->root->emit_info("export ". $name ."=". $data->{$name}) : $self->root->emit_error("'". $name ."' is not set!");
16             }
17              
18             1;
19              
20             __END__
21              
22             =pod
23              
24             =head1 NAME
25              
26             App::DuckPAN::Cmd::Env::Cmd::Get - Gets the specified env variable
27              
28             =head1 VERSION
29              
30             version 1019
31              
32             =head1 AUTHOR
33              
34             DuckDuckGo <open@duckduckgo.com>, Zach Thompson <zach@duckduckgo.com>, Zaahir Moolla <moollaza@duckduckgo.com>, Torsten Raudssus <torsten@raudss.us> L<https://raudss.us/>
35              
36             =head1 COPYRIGHT AND LICENSE
37              
38             This software is Copyright (c) 2013 by DuckDuckGo, Inc. L<https://duckduckgo.com/>.
39              
40             This is free software, licensed under:
41              
42             The Apache License, Version 2.0, January 2004
43              
44             =cut