File Coverage

blib/lib/App/Env/Example.pm
Criterion Covered Total %
statement 11 12 91.6
branch n/a
condition n/a
subroutine 4 5 80.0
pod 1 1 100.0
total 16 18 88.8


line stmt bran cond sub pod time code
1             package App::Env::Example;
2              
3             # ABSTRACT: example application environment module for App::Env.
4              
5 1     1   202604 use v5.10;
  1         4  
6 1     1   7 use strict;
  1         2  
  1         36  
7 1     1   6 use warnings;
  1         2  
  1         92  
8              
9             our $VERSION = '1.05';
10              
11             # This example uses Shell::GetEnv to illustrate how to source a shell
12             # script which defines the environment for an application. Other
13             # similar modules are Shell::Source and Shell::EnvImporter.
14              
15 1     1   719 use Shell::GetEnv;
  1         28793  
  1         144  
16              
17              
18             sub envs {
19             # my ( $opt ) = @_;
20              
21             # source the shell script and return the changed environment
22 0     0 1   return Shell::GetEnv->new( 'tcsh', 'source /usr/local/mypkg/setup.csh' )->envs;
23             }
24              
25             1;
26              
27             #
28             # This file is part of App-Env
29             #
30             # This software is Copyright (c) 2018 by Smithsonian Astrophysical Observatory.
31             #
32             # This is free software, licensed under:
33             #
34             # The GNU General Public License, Version 3, June 2007
35             #
36              
37             __END__