String::Interpolate::Shell

String::Interpolate::Shell interpolates variables into strings.
Variables are specified using a syntax similar to that use by bash.
Undefined variables can be silently ignored, removed from the string,
can cause warnings to be issued or errors to be thrown.

$*varname*
    Insert the value of the variable.

${*varname*}
    Insert the value of the variable.

${*varname*:?error message}
    Insert the value of the variable. If it is not defined, the routine
    croaks with the specified message.

${*varname*:-*default text*}
    Insert the value of the variable. If it is not defined, process the
    specified default text for any variable interpolations and insert
    the result.

${*varname*:+*default text*}
    If the variable is defined, insert the result of interpolating any
    variables into the default text.

${*varname*:=*default text*}
    Insert the value of the variable. If it is not defined, insert the
    result of interpolating any variables into the default text and set
    the variable to the same value.

${*varname*::*format*}
    Insert the value of the variable as formatted according to the
    specified sprintf compatible format.

${*varname*:~*op*/*pattern*/*replacement*/msixpogce}
    Insert the modified value of the variable. The modification is
    specified by *op*, which may be any of "s", "tr", or "y",
    corresponding to the Perl operators of the same name. Delimiters for
    the modification may be any of those recognized by Perl. The
    modification is performed using a Perl string eval.

In any of the bracketed forms, if the variable name is preceded with an
exclamation mark ("!") the name of the variable to be interpreted is
taken from the value of the specified variable.

INSTALLATION

This is a Perl module distribution. It should be installed with whichever
tool you use to manage your installation of Perl, e.g. any of

  cpanm .
  cpan  .
  cpanp -i .

Consult http://www.cpan.org/modules/INSTALL.html for further instruction.
Should you wish to install this module manually, the procedure is

  perl Makefile.PL
  make
  make test
  make install

COPYRIGHT AND LICENSE

This software is Copyright (c) 2017 by Smithsonian Astrophysical
Observatory.

This is free software, licensed under:

  The GNU General Public License, Version 3, June 2007