Skip to content

Stop implying "." belongs in $ENV{PATH} #18087

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions dist/Env/lib/Env.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package Env;

our $VERSION = '1.04';
our $VERSION = '1.05';

=head1 NAME

Expand Down Expand Up @@ -35,7 +35,7 @@ You may access its value

or modify it

$PATH .= ":.";
$PATH .= ":/any/path";
push @LD_LIBRARY_PATH, $dir;

however you'd like. Bear in mind, however, that each access to a tied array
Expand All @@ -44,15 +44,16 @@ variable requires splitting the environment variable's string anew.
The code:

use Env qw(@PATH);
push @PATH, '.';
push @PATH, '/any/path';

is equivalent to:
is almost equivalent to:

use Env qw(PATH);
$PATH .= ":.";
$PATH .= ":/any/path";

except that if C<$ENV{PATH}> started out empty, the second approach leaves
it with the (odd) value "C<:.>", but the first approach leaves it with "C<.>".
it with the (odd) value "C<:/any/path>", but the first approach leaves it with
"C</any/path>".

To remove a tied environment variable from
the environment, assign it the undefined value
Expand Down
1 change: 1 addition & 0 deletions t/porting/known_pod_issues.dat
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ dist/data-dumper/dumper.pm ? Should you be using L<...> instead of 1
dist/devel-ppport/parts/inc/ppphdoc Unknown directive: =dontwarn 1
dist/devel-ppport/parts/inc/ppphdoc Unknown directive: =implementation 1
dist/devel-ppport/parts/inc/ppphdoc Unknown directive: =provides 1
dist/env/lib/env.pm ? Should you be using F<...> or maybe L<...> instead of 1
dist/exporter/lib/exporter.pm Verbatim line length including indents exceeds 79 by 2
dist/net-ping/lib/net/ping.pm Apparent broken link 2
ext/amiga-exec/exec.pm Verbatim line length including indents exceeds 79 by 1
Expand Down