NAME
Locale::Utils::PlaceholderNamed - Utils to expand named placeholders
$Id: PlaceholderNamed.pm 392 2011-12-06 11:56:46Z steffenw $
$HeadURL: https://perl-gettext-oo.svn.sourceforge.net/svnroot/perl-gettext-oo/Locale-Utils-PlaceholderNamed/trunk/lib/Locale/Utils/PlaceholderNamed.pm $
VERSION
0.002
SYNOPSIS
use Locale::Utils::PlaceholderNamed;
my $obj = Locale::Utils::PlaceholderNamed->new(
# optional strict switch
strict => 1,
);
$expanded = $obj->expand_named($text, %args);
DESCRIPTION
Utils to expand named placeholders.
SUBROUTINES/METHODS
method strict
If strict is true: undef will be converted to q{}. If strict is false: no replacement.
$obj->strict(1); # boolean true or false;
method expand_text
Expands strings containing named placeholders like {name}
.
named style:
{name_is_key_of_args_hash}
$expanded = $obj->expand_text($text, %args);
EXAMPLE
Inside of this distribution is a directory named example. Run the *.pl files.
DIAGNOSTICS
none
CONFIGURATION AND ENVIRONMENT
none
DEPENDENCIES
INCOMPATIBILITIES
not known
BUGS AND LIMITATIONS
not known
SEE ALSO
http://en.wikipedia.org/wiki/Gettext
http://translate.sourceforge.net/wiki/l10n/pluralforms
AUTHOR
Steffen Winkler
LICENSE AND COPYRIGHT
Copyright (c) 2011, Steffen Winkler <steffenw at cpan.org>
. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.