String-Interpolate-Named - Interpolated named arguments in string
String::Interpolate::Named provides a single function, interpolate,
that takes a string and substitutes named variables by target texts.
Example:
use String::Interpolate::Named;
my $ctl = { args => { fn => "Johann", ln => "Bach" } };
say interpolate( $ctl, "The famous %{fn} %{ln}." );
# Result = "The famous Johann Bach"
Other features are selecting true/false texts:
"The task is %{done|ready|unfinished}."
Testing specific values:
"%{instrument=piano|Play this with elbows}"
Selecting one out of a list of values:
"First customer is %{customer.1}"
SUPPORT AND DOCUMENTATION
Development of this module takes place on GitHub:
https://github.com/sciurius/perl-String-Interpolate-Named.
You can find documentation for this module with the perldoc command.
perldoc String::Interpolate::Named
Please report any bugs or feature requests using the issue tracker on
GitHub.
COPYRIGHT AND LICENCE
Copyright (C) 2018,2019 Johan Vromans
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
Select Git revision
libstring-interpolate-named-perl
-
-
- Open in your IDE
- Download source code
Roland Rosenfeld authored
| Name | Last commit | Last update |
|---|---|---|
| debian | ||
| lib/String/Interpolate | ||
| t | ||
| Changes | ||
| MANIFEST | ||
| META.json | ||
| META.yml | ||
| Makefile.PL | ||
| README |