This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix ext/XS-APItest/t/multicall.t warning
[perl5.git] / lib / importenv.pl
1 warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
2
3 # This library is no longer being maintained, and is included for backward
4 # compatibility with Perl 4 programs which may require it.
5 # This legacy library is deprecated and will be removed in a future
6 # release of perl.
7
8 ;# This file, when interpreted, pulls the environment into normal variables.
9 ;# Usage:
10 ;#      require 'importenv.pl';
11 ;# or
12 ;#      #include <importenv.pl>
13
14 local($tmp,$key) = '';
15
16 foreach $key (keys(%ENV)) {
17     $tmp .= "\$$key = \$ENV{'$key'};" if $key =~ /^[A-Za-z]\w*$/;
18 }
19 eval $tmp;
20
21 1;