summaryrefslogtreecommitdiff
path: root/dist/Env
Commit message (Collapse)AuthorAgeFilesLines
* Prefer scalar assignment to get caller's first return valueRichard Leach2023-02-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Multiple forms of syntax can be used to obtain a package name from `caller`, which emits this as its first return value, and assign that name to a lexical scalar. The following each achieve the same result, but with varying efficiency: * `sub callme { my $package = caller(2); ...}` * `sub callme { my ($package) = caller(2); ...}` * `sub callme { my $package = (caller(2))[0]; ...}` In the first example, `pp_caller` determines only the package name and pushes it to the stack. In the other two examples, the other 10 of `caller`'s return values are calculated and pushed onto the stack, before being discarded. This commit changes non-CPAN-first instances of the latter two forms in core to the first form. Note: There is a special exception to the equivalence described above, when caller is use in list context within the DB package. Such a usage instance in regen/warnings.pl therefore remains unchanged.
* Stop implying "." belongs in $ENV{PATH}Tom Hukins2020-08-261-6/+7
| | | | | | | | Instead, use an arbitrary path that has less chance of encouraging people to allow the current directory in their path. This was prompted by #16951 and attached as a patch to that issue which was mistakenly closed without fixing the problem.
* Env.pm: Fix splice in list contextFather Chrysostomos2012-11-112-2/+6
| | | | | It was passing an extra argument to splice, causing splice @PATH, 0, 0 to append ":0" to the environment variable.
* Increase $Env::VERSION to 1.04Father Chrysostomos2012-11-111-1/+1
|
* Synchronise Env to CPANFlorian Ragwitz2011-07-091-1/+1
|
* Exchange dist/Env/t/{array,env}.t, which were transposed by b695f709e8a342e3Nicholas Clark2011-01-242-70/+70
|
* Convert Env's tests to Test::MoreNicholas Clark2011-01-242-80/+47
|
* Upgrade Env from version 1.01 to 1.02Florian Ragwitz2010-12-151-1/+1
| | | | | This is necessary so the CPAN version can fix the INSTALLDIRS parameter it uses on older perls.
* Dual-life EnvFlorian Ragwitz2010-12-103-0/+369