PATCH: Makefile in lib/unicore shouldn't clean .t file
[p5sagit/p5-mst-13.2.git] / lib / importenv.pl
CommitLineData
42cb3b6d 1# This library is no longer being maintained, and is included for backward
2# compatibility with Perl 4 programs which may require it.
3# This legacy library is deprecated and will be removed in a future
4# release of perl.
5
6warn( "The 'importenv.pl' legacy library is deprecated and will be"
7 . " removed in the next major release of perl. Please use the"
8 . " Env::Export module (or similar) from CPAN instead." );
9
378cc40b 10;# This file, when interpreted, pulls the environment into normal variables.
11;# Usage:
154e51a4 12;# require 'importenv.pl';
378cc40b 13;# or
14;# #include <importenv.pl>
15
16local($tmp,$key) = '';
17
8ebc5c01 18foreach $key (keys(%ENV)) {
378cc40b 19 $tmp .= "\$$key = \$ENV{'$key'};" if $key =~ /^[A-Za-z]\w*$/;
20}
21eval $tmp;
a687059c 22
231;