util - optex argument utility modules
optex command -Mutil::argv
This module is a collection of sample utility functions for command optex.
Function can be called with option declaration. Parameters for the function are passed by name and value list: name=value. Value 1 is assigned for the name without value.
In this example,
optex -Mutil::function(debug,message=hello,count=3)
option debug has value 1, message has string "hello", and count also has string "3".
Multiply each arguments. Default count is 2.
% optex echo -Mutil::times(count=3) 1 2 3 1 1 1 2 2 2 3 3 3
Put suffix to duplicated arguments.
% optex echo -Mutil::times(suffix=.bak) a b c a a.bak b b.bak c c.bak
Reverse arguments.
Process substitution.
% optex diff -Mutil::argv::proc= '<(date)' '<(date -u)'
To install App::optex, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::optex
CPAN shell
perl -MCPAN -e shell install App::optex
For more information on module installation, please visit the detailed CPAN module installation guide.