App::dex - Directory Execute
dex provides a command line utility for managing directory-specific commands.
dex - Display the menu dex command - Run a command dex command subcommand - Run a sub command
Create a file called dex.yaml or .dex.yaml and define commands to be run.
dex.yaml
.dex.yaml
This is an example dex file.
- name: build desc: "Run through the build process, including testing." shell: - ./fatpack.sh - dzil test - dzil build - name: test desc: "Just test the changes" shell: - dzil test - name: release desc: "Publish App::Dex to CPAN" shell: - dzil release - name: clean desc: "Remove artifacts" shell: - dzil clean - name: authordeps desc: "Install distzilla and dependencies" shell: - cpanm Dist::Zilla - dzil authordeps --missing | cpanm - dzil listdeps --develop --missing | cpanm
When running the command dex, a menu will display:
$ dex build : Run through the build process, including testing. test : Just test the changes release : Publish App::Dex to CPAN clean : Remove artifacts authordeps : Install distzilla and dependencies
To execute the build command run dex build.
dex build
Commands can be grouped to logically organize them, for example:
- name: foo desc: "Foo command" children: - name: bar desc: "Bar subcommand" shell: - echo "Ran the command!"
The menu for this would show the relationship:
$ dex foo : Foo command bar : Bar subcommand
To execute the command one would run dex foo bar.
dex foo bar
When dex doesn't understand the command it will give an error and display the menu. It can be configured to allow another program to try to execute the command.
Set the environment variable DEX_FALLBACK_CMD to the command you would like to run instead.
DEX_FALLBACK_CMD
Kaitlyn Parkhurst (SymKat) <symkat@symkat.com> ( Blog: http://symkat.com/ )
Copyright (c) 2019 the App::dex "AUTHOR", "CONTRIBUTORS", and "SPONSORS" as listed above.
This library is free software and may be distributed under the same terms as perl itself.
The most current version of App::dec can be found at https://github.com/symkat/App-dex
To install App::Dex, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Dex
CPAN shell
perl -MCPAN -e shell install App::Dex
For more information on module installation, please visit the detailed CPAN module installation guide.