| 1 | package Psh::Builtins::Setenv; | ||
| 2 | |||
| 3 | require Psh::Support::Env; | ||
| 4 | require Psh::Util; | ||
| 5 | |||
| 6 | =item * C<setenv NAME [=] VALUE> | ||
| 7 | |||
| 8 | Sets the environment variable NAME to VALUE. | ||
| 9 | |||
| 10 | =cut | ||
| 11 | |||
| 12 | sub bi_setenv | ||
| 13 | { | ||
| 14 | my $var = Psh::Support::Env::do_setenv(@_); | ||
| 15 | if (!$var) { | ||
| 16 | Psh::Util::print_error_i18n('usage_setenv'); | ||
| 17 | return (0,undef); | ||
| 18 | } | ||
| 19 | return (1,undef); | ||
| 20 | } | ||
| 21 | |||
| 22 | |||
| 23 | 1; |