| 1 | package Shell::EnvImporter::Shell::csh; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | no warnings 'uninitialized'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 1 | ▶ | use base qw(Shell::EnvImporter::Shell); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 1 | ▶ | use Class::MethodMaker 2.0 [ | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 1 | new => [qw(-init new)], | |||||||||
| 11 | 1 | ]; | |||||||||
| 12 | |||||||||||
| 13 | ########## | ||||||||||
| 14 | 1 | ▶ | sub init { | ||||||||
|
Subroutine
init: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 15 | ########## | ||||||||||
| 16 | 1 | my $self = shift; | |||||||||
| 17 | 1 | my %args = @_; | |||||||||
| 18 | |||||||||||
| 19 | 1 | $self->SUPER::init( | |||||||||
| 20 | name => 'csh', | ||||||||||
| 21 | flags => [qw(-f -c)], | ||||||||||
| 22 | sourcecmd => 'source', | ||||||||||
| 23 | statusvar => '$status', | ||||||||||
| 24 | %args, | ||||||||||
| 25 | ); | ||||||||||
| 26 | |||||||||||
| 27 | 1 | $self->ignore_push(qw(GROUP HOST HOSTTYPE MACHTYPE OSTYPE VENDOR)); | |||||||||
| 28 | |||||||||||
| 29 | |||||||||||
| 30 | } | ||||||||||
| 31 | |||||||||||
| 32 | |||||||||||
| 33 | ################ | ||||||||||
| 34 | 0 | ▶ | sub env_export { | ||||||||
|
Subroutine
env_export: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||
| 35 | ################ | ||||||||||
| 36 | 0 | my $self = shift; | |||||||||
| 37 | 0 | ▶ | my %values = (@_ == 1 ? %{$_[0]} : @_); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 38 | |||||||||||
| 39 | 0 | my @sets; | |||||||||
| 40 | 0 | foreach my $var (sort keys %values) { | |||||||||
| 41 | 0 | ▶ | if (defined($values{$var})) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 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 | 1; | |||||||||