App-plx
view release on metacpan or search on metacpan
lib/App/plx.pm view on Meta::CPAN
plx --bareinit <perl> # Initialize bare layout config for .
plx --base # Show layout base dir
plx --base <base> <action> <args> # Run action with specified base dir
plx --perl # Show layout perl binary
plx --libs # Show layout $PERL5LIB entries
plx --paths # Show layout additional $PATH entries
plx --env # Show layout env var changes
plx --cpanm -llocal --installdeps . # Run cpanm from outside $PATH
plx --config perl # Show perl binary
plx --config perl set /path/to/perl # Select exact perl binary
plx --config perl set perl-5.xx.y # Select perl via $PATH or perlbrew
plx --config libspec # Show lib specifications
plx --config libspec add <name> <path> # Add lib specification
plx --config libspec del <name> <path> # Delete lib specification
plx --config env # Show additional env vars
plx --config env add <name> <path> # Add env var
plx --config env del <name> <path> # Delete env var
plx --exec <cmd> <args> # exec()s with env vars set
plx --perl <args> # Run perl with args
plx --cmd <cmd> <args> # DWIM command:
cmd = perl -> --perl <args>
cmd = -<flag> -> --perl -<flag> <args>
cmd = some/file -> --perl some/file <args>
cmd = ./file -> --perl ./file <args>
cmd = name ->
exists .plx/cmd/<name> -> --perl .plx/cmd/<name> <args>
exists dev/<name> -> --perl dev/<name> <args>
exists bin/<name> -> --perl bin/<name> <args>
else -> --exec <name> <args>
plx --which <cmd> # Expands --cmd <cmd> without running
plx <something> <args> # Shorthand for plx --cmd
plx --commands <filter>? # List available commands
plx --multi [ <cmd1> <args1> ] [ ... ] # Run multiple actions
plx --showmulti [ ... ] [ ... ] # Show multiple action running
plx [ ... ] [ ... ] # Shorthand for plx --multi
plx --userinit <perl> # Init ~/.plx with ~/perl5 ll
plx --installself # Installs plx and cpanm into layout
plx --installenv # Appends plx --env call to .bashrc
plx --userstrap <perl> # userinit+installself+installenv
=head2 --help
Prints out the usage information (i.e. the L</SYNOPSIS>) for plx.
=head2 --init
plx --init # resolve 'perl' in $PATH
plx --init perl # (ditto)
plx --init 5.28.0 # looks for perl5.28.0 in $PATH
# or perl-5.28.0 in perlbrew
plx --init /path/to/some/perl # uses the absolute path directly
Initializes the layout.
If a perl name is passed, attempts to resolve it via C<$PATH> and C<perlbrew>
and sets the result as the layout perl; if not looks for just C<perl>.
Creates the following libspec config:
25-local.ll local
50-devel.ll devel
75-lib.dir lib
=head2 --bareinit
Identical to C<--init> but creates no default configs except for C<perl>.
=head2 --base
plx --base
plx --base <base> <action> <args>
Without arguments, shows the selected base dir - C<plx> finds this by
checking for a C<.plx> directory in the current directory, and if not tries
the parent directory, recursively. The search stops either when C<plx> finds
a C<.git> directory, to avoid accidentally escaping a project repository, or
at the last directory before the root - i.e. C<plx> will test C</home> but
not C</>.
With arguments, specifies a base dir to use, and then invokes the rest of the
arguments with that base dir selected - so for example one can make a default
configuration in C<$HOME> available as C<plh> by running:
plx --init $HOME
alias plh='plx --base $HOME'
=head2 --libs
Prints the directories that will be added to C<PERL5LIB>, one per line.
These will include the C<lib/perl5> subdirectory for each C<ll> entry in the
libspecs, and the directory for each C<dir> entry.
=head2 --paths
Prints the directories that will be added to C<PATH>, one per line.
These will include the containing directory of the environment's perl binary
if not already in C<PATH>, followed by the C<bin> directories of any C<ll>
entries in the libspecs.
=head2 --env
Prints the changes that will be made to your environment variables, in a
syntax that is (hopefully) correct for your current shell.
=head2 --cpanm
plx --cpanm -Llocal --installdeps .
plx --cpanm -ldevel App::Ack
Finds the C<cpanm> binary in the C<PATH> that C<plx> was executed I<from>,
and executes it using the layout's perl binary and environment variables.
Requires the user to specify a L<local::lib> to install into via C<-l> or
C<-L> in order to avoid installing modules into unexpected places.
( run in 2.695 seconds using v1.01-cache-2.11-cpan-75ffa21a3d4 )