Skip to content
Snippets Groups Projects
Select Git revision
  • debian/latest
  • pristine-tar
  • upstream/latest
  • debian/1.06-1
  • upstream/1.06
  • upstream/1.05
  • debian/1.03-2
  • debian/1.03-1
  • upstream/1.03
9 results

libstring-interpolate-named-perl

  • Clone with SSH
  • Clone with HTTPS
  • 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.