Locale:...conKeys(3)
π NAME π
Locale::TextDomain::OO::Util::JoinSplitLexiconKeys β okay bestie, this one handles the lexicon and the message key. That's the whole job. It joins 'em, it splits 'em, it's giving bilingual chaos coordinator. π
β¨ VERSION β¨
4.001, obviously. She's got receipts:
$Id: JoinSplitLexiconKeys.pm 715 2018-06-04 15:08:31Z steffenw $
$HeadURL:
svn+ssh://steffenw@svn.code.sf.net/p/perl-gettext-oo/code/Locale-TextDomain-OO-Util/trunk/lib/Locale/TextDomain/OO/Util/JoinSplitLexiconKeys.pm
$
π¦ SYNOPSIS π¦
use Locale::TextDomain::OO::Util::JoinSplitLexiconKeys;
my $keys_util = Locale::TextDomain::OO::Util::JoinSplitLexiconKeys->instance;
That's it, that's the entry fee. Get your instance and you're in. π
πΈ DESCRIPTION πΈ
It's the module that handles the lexicon and message key. Lowkey the entire personality is "keys, joined and split." Periodt.
π SUBROUTINES/METHODS π
π« method instance
see SYNOPSIS β like, literally go look up there, she already told you. π
π« method join_lexicon_key
$lexicon_key = $keys_util->join_lexicon_key({
category => 'LC_MESSAGES', # default q{}
domain => 'TextDomain', # default q{}
language => 'de-de', # default 'i-default' = developer English
# mostly not needed
project => 'myProject', # default not exists
});
Note the defaults, bestie β category and domain default to q{} (that's the empty string, mwah), language defaults to 'i-default' which is developer English, and project is mostly not needed and by default not exists. π«Ά
π« method split_lexicon_key
This method is the reverse implementation of method join_lexicon_key. Undo button energy. βͺ
$hash_ref = $keys_util->split_lexicon_key($lexicon_key);
π« method join_message_key
$message_key = $keys_util->join_message_key({
msgctxt => 'my context',
msgid => 'simple text or singular',
msgid_plural => 'plural',
});
JSON format β¨
$message_key = $keys_util->join_message_key(
{
msgctxt => 'my context',
msgid => 'simple text or singular',
msgid_plural => 'plural',
},
'JSON',
);
π« method split_message_key
This method is the reverse implementation of method join_message_key. Again with the reverse, she's versatile. π
$hash_ref = $keys_util->split_message_key($message_key);
JSON format β¨
$hash_ref = $keys_util->split_message_key($message_key, 'JSON');
π« method join_message
This method puts all data into the message_ref. Everything. All of it. π
$message_ref = $keys_util->join_message(
$message_key, # joined msgctxt, msgid, msgid_plural
$message_value_ref, # all other as hash reference
);
JSON format β¨
$message_ref = $keys_util->join_message(
$message_key, # joined msgctxt, msgid, msgid_plural
$message_value_ref, # all other as hash reference
'JSON',
);
π« method split_message
This method splits the message reference into a message key and the rest. The rest!! π
( $message_key, $message_value_ref )
= $keys_util->split_message($message_ref);
JSON format β¨
( $message_key, $message_value_ref )
= $keys_util->split_message($message_ref, 'JSON');
π EXAMPLE π
Inside of this distribution is a directory named example. Run this *.pl files. Go on, run 'em, they don't bite. π§
π DIAGNOSTICS π
none β no drama, no warnings, she's unbothered. β¨
π CONFIGURATION AND ENVIRONMENT π
none β no env vars, no config files, nothing to set up. Main character who needs no settings. π
π«Ά DEPENDENCIES π«Ά
Locale::TextDomain::OO::Util::Constantsnamespace::autoclean
Two besties, that's the whole squad. π
π INCOMPATIBILITIES π
not known β as far as anyone knows, she plays nice with everybody. π¦
β BUGS AND LIMITATIONS β
none β flawless, no cap, and we're not taking questions. π
π SEE ALSO π
Locale::TextDoamin::OO
yes that's spelled exactly like that in the original, bestie, do not "fix" it, we keep it verbatim, that's the rule π
πΈ AUTHOR πΈ
Steffen Winkler π
π LICENSE AND COPYRIGHT π
Copyright (c) 2014 - 2018, 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. Slay, legally speaking. π
And that's the whole page, bestie β brought to you by perl v5.42.0, dated 2025-07-25, from Locale:...conKeys(3). Mwah, go join some keys. π
β¨
π¦ where this page comes from
- fedora 43: perl-Locale-TextDomain-OO-Util 4.002-19.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms