line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Shell::EnvImporter::Shell::csh; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
8
|
use strict; |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
60
|
|
4
|
1
|
|
|
1
|
|
10
|
use warnings; |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
68
|
|
5
|
1
|
|
|
1
|
|
7
|
no warnings 'uninitialized'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
67
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
8
|
use base qw(Shell::EnvImporter::Shell); |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
383
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
use Class::MethodMaker 2.0 [ |
10
|
1
|
|
|
|
|
24
|
new => [qw(-init new)], |
11
|
1
|
|
|
1
|
|
12
|
]; |
|
1
|
|
|
|
|
40
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
########## |
14
|
|
|
|
|
|
|
sub init { |
15
|
|
|
|
|
|
|
########## |
16
|
1
|
|
|
1
|
0
|
145
|
my $self = shift; |
17
|
1
|
|
|
|
|
5
|
my %args = @_; |
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
|
|
14
|
$self->SUPER::init( |
20
|
|
|
|
|
|
|
name => 'csh', |
21
|
|
|
|
|
|
|
flags => [qw(-f -c)], |
22
|
|
|
|
|
|
|
sourcecmd => 'source', |
23
|
|
|
|
|
|
|
statusvar => '$status', |
24
|
|
|
|
|
|
|
%args, |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
|
27
|
1
|
|
|
|
|
48
|
$self->ignore_push(qw(GROUP HOST HOSTTYPE MACHTYPE OSTYPE VENDOR)); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
################ |
34
|
|
|
|
|
|
|
sub env_export { |
35
|
|
|
|
|
|
|
################ |
36
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
37
|
0
|
0
|
|
|
|
|
my %values = (@_ == 1 ? %{$_[0]} : @_); |
|
0
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
my @sets; |
40
|
0
|
|
|
|
|
|
foreach my $var (sort keys %values) { |
41
|
0
|
0
|
|
|
|
|
if (defined($values{$var})) { |
42
|
0
|
|
|
|
|
|
push(@sets, "setenv $var $values{$var}"); |
43
|
|
|
|
|
|
|
} else { |
44
|
0
|
|
|
|
|
|
push(@sets, "unsetenv $var"); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
return join($self->cmdsep, @sets); |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |