You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we want our ~/perl [local::lib](https://metacpan.org/pod/local::lib) available within the plx environment, we
117
+
If we want our ~/perl [local::lib](https://metacpan.org/pod/local%3A%3Alib) available within the plx environment, we
118
118
can add that as the least significant libspec with:
119
119
120
120
plx --config libspec add 00tilde.ll $HOME/perl5
@@ -145,9 +145,36 @@ installer available, you can run:
145
145
146
146
to get the current latest packed version.
147
147
148
-
The packed version bundled[local::lib](https://metacpan.org/pod/local::lib) and [File::Which](https://metacpan.org/pod/File::Which), and also includes
148
+
The packed version bundles[local::lib](https://metacpan.org/pod/local%3A%3Alib) and [File::Which](https://metacpan.org/pod/File%3A%3AWhich), and also includes
149
149
a modified `--cpanm` action that uses an inline `App::cpanminus`.
150
150
151
+
# ENVIRONMENT
152
+
153
+
`plx` actions that execute external commands all clear any existing
154
+
environment variables that start with `PERL` to keep an encapsulated setup
155
+
for commands being run within the layouts - and also set `PERL5OPT` to
156
+
exclude `site_perl` (but not `vendor_perl`) to avoid locally installed
157
+
modules causing unexpected effects.
158
+
159
+
Having done so, `plx` then loads each env config entry and sets those
160
+
variables - then prepends the `plx` specific entries to both `PATH` and
161
+
`PERL5LIB`. You can add env config entries with ["--config"](#config):
162
+
163
+
plx --config env add NAME VALUE
164
+
165
+
The changes that will be made to your environment can be output by calling
166
+
the ["--env"](#env) command.
167
+
168
+
Additionally, environment variable overrides may be provided to the
169
+
["--cmd"](#cmd), ["--exec"](#exec) and ["--perl"](#perl) commands by providing them in
170
+
`NAME=VALUE` format:
171
+
172
+
# do not do this, it will be deleted
173
+
PERL_RL=Perl5 plx <something>
174
+
175
+
# do this instead, it will provide the environment variable to the command
176
+
plx PERL_RL=Perl5 <something>
177
+
151
178
# ACTIONS
152
179
153
180
plx --help # Print synopsis
@@ -280,11 +307,11 @@ syntax that is (hopefully) correct for your current shell.
280
307
Finds the `cpanm` binary in the `PATH` that `plx` was executed _from_,
281
308
and executes it using the layout's perl binary and environment variables.
282
309
283
-
Requires the user to specify a [local::lib](https://metacpan.org/pod/local::lib) to install into via `-l` or
310
+
Requires the user to specify a [local::lib](https://metacpan.org/pod/local%3A%3Alib) to install into via `-l` or
284
311
`-L` in order to avoid installing modules into unexpected places.
285
312
286
313
Note that this action exists primarily for bootstrapping, and if you want
287
-
to use a different installer such as [App::cpm](https://metacpan.org/pod/App::cpm), you'd install it with:
314
+
to use a different installer such as [App::cpm](https://metacpan.org/pod/App%3A%3Acpm), you'd install it with:
288
315
289
316
plx --cpanm -ldevel App::cpm
290
317
@@ -324,7 +351,7 @@ layout's perl with the given options and arguments.
324
351
exists bin/<name> -> --perl bin/<name> <args>
325
352
else -> --exec <name> <args>
326
353
327
-
**Note**: Much like the `devel`[local::lib](https://metacpan.org/pod/local::lib) is created to allow for the
354
+
**Note**: Much like the `devel`[local::lib](https://metacpan.org/pod/local%3A%3Alib) is created to allow for the
328
355
installation of out-of-band dependencies that aren't going to be needed in
329
356
production, the `dev` directory is supported to allow for the easy addition
330
357
of development time only sugar commands. Note that since `perl` will re-exec
@@ -390,7 +417,7 @@ The part of the name before the last `.` is not semantically significant to
390
417
plx, but is used for asciibetical sorting of the libspec entries to determine
391
418
in which order to apply them.
392
419
393
-
The part after must be either `ll` for a [local::lib](https://metacpan.org/pod/local::lib), or `dir` for a bare
420
+
The part after must be either `ll` for a [local::lib](https://metacpan.org/pod/local%3A%3Alib), or `dir` for a bare
394
421
[lib](https://metacpan.org/pod/lib) directory.
395
422
396
423
When loaded, the spec is (if relative) resolved to an absolute path relative
@@ -438,8 +465,8 @@ libspec pointing at `$HOME/perl5`.
438
465
439
466
## --installself
440
467
441
-
Installs [App::plx](https://metacpan.org/pod/App::plx) and [App::cpanminus](https://metacpan.org/pod/App::cpanminus) into the highest-numbered
442
-
[local::lib](https://metacpan.org/pod/local::lib) within the layout.
468
+
Installs [App::plx](https://metacpan.org/pod/App%3A%3Aplx) and [App::cpanminus](https://metacpan.org/pod/App%3A%3Acpanminus) into the highest-numbered
469
+
[local::lib](https://metacpan.org/pod/local%3A%3Alib) within the layout.
0 commit comments