NAME
App::Yath::Command::spawn - Launch a perl script from the preloaded environment
DESCRIPTION
This will launch the specified script from the preloaded yath process.
NOTE: environment variables are not automatically passed to the spawned process. You must use -e or -E (see help) to specify what environment variables you care about.
USAGE
$ yath [YATH OPTIONS] spawn [COMMAND OPTIONS] [COMMAND ARGUMENTS]
OPTIONS
Harness Options
- -d
- --dummy
- --no-dummy
-
Dummy run, do not actually execute anything
Can also be set with the following environment variables:
T2_HARNESS_DUMMY
The following environment variables will be cleared after arguments are processed:
T2_HARNESS_DUMMY
- --procname-prefix ARG
- --procname-prefix=ARG
- --no-procname-prefix
-
Add a prefix to all proc names (as seen by ps).
The following environment variables will be set after arguments are processed:
T2_HARNESS_PROC_PREFIX
IPC Options
- --ipc-address ARG
- --ipc-address=ARG
- --no-ipc-address
-
IPC address to use (usually auto-generated or discovered)
- --ipc-allow-multiple
- --no-ipc-allow-multiple
-
Normally yath will prevent you from starting multiple persistent runners in the same project, this option will allow you to start more than one.
- --ipc-dir ARG
- --ipc-dir=ARG
- --no-ipc-dir
-
Directory for ipc files
Can also be set with the following environment variables:
T2_HARNESS_IPC_DIR
,YATH_IPC_DIR
- --ipc-dir-order ARG
- --ipc-dir-order=ARG
- --ipc-dir-order '["json","list"]'
- --ipc-dir-order='["json","list"]'
- --ipc-dir-order :{ ARG1 ARG2 ... }:
- --ipc-dir-order=:{ ARG1 ARG2 ... }:
- --no-ipc-dir-order
-
When finding ipc-dir automatically, search in this order, default: ['base', 'temp']
Note: Can be specified multiple times
- --ipc-file ARG
- --ipc-file=ARG
- --no-ipc-file
-
IPC file used to locate instances (usually auto-generated or discovered)
- --ipc-peer-pid ARG
- --ipc-peer-pid=ARG
- --no-ipc-peer-pid
-
Optionally a peer PID may be provided
- --ipc-port ARG
- --ipc-port=ARG
- --no-ipc-port
-
Some IPC protocols require a port, otherwise this should be left empty
- --ipc-prefix ARG
- --ipc-prefix=ARG
- --no-ipc-prefix
-
Prefix for ipc files
- --ipc-protocol IPSocket
- --ipc-protocol AtomicPipe
- --ipc-protocol UnixSocket
- --ipc-protocol +Test2::Harness::IPC::Protocol::AtomicPipe
- --no-ipc-protocol
-
Specify what IPC Protocol to use. Use the "+" prefix to specify a fully qualified namespace, otherwise Test2::Harness::IPC::Protocol::XXX namespace is assumed.
Yath Options
- --base-dir ARG
- --base-dir=ARG
- --no-base-dir
-
Root directory for the project being tested (usually where .yath.rc lives)
- -D
- -Dlib
- -Dlib
- -D=lib
- -D"lib/*"
- --dev-lib
- --dev-lib=lib
- --dev-lib="lib/*"
- --no-dev-lib
-
This is what you use if you are developing yath or yath plugins to make sure the yath script finds the local code instead of the installed versions of the same code. You can provide an argument (-Dfoo) to provide a custom path, or you can just use -D without and arg to add lib, blib/lib and blib/arch.
Note: This option can cause yath to use exec() to reload itself with the correct libraries in place. Each occurence of this argument can cause an additional exec() call. Use --dev-libs-verbose BEFORE any -D calls to see the exec() calls.
Note: Can be specified multiple times
- --dev-libs-verbose
- --no-dev-libs-verbose
-
Be verbose and announce that yath will re-exec in order to have the correct includes (normally yath will just call exec() quietly)
- -h
- -h=Group
- --help
- --help=Group
- --no-help
-
exit after showing help information
- -p key=val
- -p=key=val
- -pkey=value
- -p '{"json":"hash"}'
- -p='{"json":"hash"}'
- -p:{ KEY1 VAL KEY2 :{ VAL1 VAL2 ... }: ... }:
- -p :{ KEY1 VAL KEY2 :{ VAL1 VAL2 ... }: ... }:
- -p=:{ KEY1 VAL KEY2 :{ VAL1 VAL2 ... }: ... }:
- --plugin key=val
- --plugin=key=val
- --plugins key=val
- --plugins=key=val
- --plugin '{"json":"hash"}'
- --plugin='{"json":"hash"}'
- --plugins '{"json":"hash"}'
- --plugins='{"json":"hash"}'
- --plugin :{ KEY1 VAL KEY2 :{ VAL1 VAL2 ... }: ... }:
- --plugin=:{ KEY1 VAL KEY2 :{ VAL1 VAL2 ... }: ... }:
- --plugins :{ KEY1 VAL KEY2 :{ VAL1 VAL2 ... }: ... }:
- --plugins=:{ KEY1 VAL KEY2 :{ VAL1 VAL2 ... }: ... }:
- --no-plugins
-
Load a yath plugin.
Note: Can be specified multiple times
- --project ARG
- --project=ARG
- --project-name ARG
- --project-name=ARG
- --no-project
-
This lets you provide a label for your current project/codebase. This is best used in a .yath.rc file.
- --scan-options key=val
- --scan-options=key=val
- --scan-options '{"json":"hash"}'
- --scan-options='{"json":"hash"}'
- --scan-options(?^:^--(no-)?(?^:scan-(.+))$)
- --scan-options :{ KEY1 VAL KEY2 :{ VAL1 VAL2 ... }: ... }:
- --scan-options=:{ KEY1 VAL KEY2 :{ VAL1 VAL2 ... }: ... }:
- --no-scan-options
- /^--(no-)?scan-(.+)$/
-
Yath will normally scan plugins for options. Some commands scan other libraries (finders, resources, renderers, etc) for options. You can use this to disable all scanning, or selectively disable/enable some scanning.
Note: This is parsed early in the argument processing sequence, before options that may be earlier in your argument list.
Note: Can be specified multiple times
- --show-opts
- --show-opts=group
- --no-show-opts
-
Exit after showing what yath thinks your options mean
- --user ARG
- --user=ARG
- --no-user
-
Username to associate with logs, database entries, and yath servers.
Can also be set with the following environment variables:
YATH_USER
,USER
- -V
- --version
- --no-version
-
Exit after showing a helpful usage message
spawn options
- -e HOME
- -e SHELL
- -e /PERL_.*/i
- --copy-env HOME
- --copy-env SHELL
- --copy-env /PERL_.*/i
- --no-copy-env
-
Specify environment variables to pass along with their current values, can also use a regex
Note: Can be specified multiple times
- -EVAR=VAL
- -E VAR=VAL
- --env-var VAR=VAL
- --no-env-var
-
Set environment variables for the spawn
Note: Can be specified multiple times
- -s foo
- --stage foo
- --no-stage
-
Specify the stage to be used for launching the script
SOURCE
The source code repository for Test2-Harness can be found at http://github.com/Test-More/Test2-Harness/.
MAINTAINERS
AUTHORS
COPYRIGHT
Copyright Chad Granum <exodist7@gmail.com>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.