Subject: | Suggested patch - new feature |
Date: | Sat, 20 Jul 2013 11:50:41 -0700 |
To: | bug-Shell-GetEnv [...] rt.cpan.org |
From: | "Marty O'Brien" <mobrule [...] gmail.com> |
Hi Dr. Jerius,
New Perl programmers are often confused about how the system call
interacts with the environment, and they wonder why code like this
system('export foo=bar');
system('echo $foo');
behaves differently from
system('export foo=bar; echo $foo');
I came across your Shell-GetEnv distribution and thought about how it could
be used to get those first lines of code to do what the user intends to do.
The only thing missing from the functionality of Shell-GetEnv that would
let me write a wrapper function and create a drop in replacement for
system is the ability to retrieve the exit status of the process. This
suggested patch adds that functionality. It includes new tests and test
scripts, though I neglected to patch the module documentation.
Suggested patch enclosed.
Marty O'Brien
mob@cpan.org
Message body is not shown because sender requested not to inline it.