Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Prefer scalar assignment to get caller's first return value | Richard Leach | 2023-02-22 | 1 | -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 Hukins | 2020-08-26 | 1 | -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 context | Father Chrysostomos | 2012-11-11 | 2 | -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.04 | Father Chrysostomos | 2012-11-11 | 1 | -1/+1 |
| | |||||
* | Synchronise Env to CPAN | Florian Ragwitz | 2011-07-09 | 1 | -1/+1 |
| | |||||
* | Exchange dist/Env/t/{array,env}.t, which were transposed by b695f709e8a342e3 | Nicholas Clark | 2011-01-24 | 2 | -70/+70 |
| | |||||
* | Convert Env's tests to Test::More | Nicholas Clark | 2011-01-24 | 2 | -80/+47 |
| | |||||
* | Upgrade Env from version 1.01 to 1.02 | Florian Ragwitz | 2010-12-15 | 1 | -1/+1 |
| | | | | | This is necessary so the CPAN version can fix the INSTALLDIRS parameter it uses on older perls. | ||||
* | Dual-life Env | Florian Ragwitz | 2010-12-10 | 3 | -0/+369 |