Psh/Builtins/Source.pm untested

filter: Statementstmt 0.0% 0 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 17 CC 1 SCAR 6.9
CC
1
Cov
0%
bi_source
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Psh::Builtins::Source;
2  
3 require Psh::Util;
4 require Psh;
5  
6 =item * C<source FILE> [or C<. FILE>]
7  
8 Read and process the contents of the given file as a sequence of B<psh>
9 commands.
10  
11 =cut
12  
13 sub bi_source
14 {
15 local $Psh::echo = 0;
16 local $Psh::interactive= 0;
17 foreach my $file (@{$_[1]}) {
18 print "$file\n";
19 Psh::process_file(Psh::Util::abs_path($file));
20 }
21  
22 return (1,undef);
23 }
24  
25 1;