Locale:...Category(3)
π NAME π
okay so bestie, welcome to Locale::TextDomain::OO::Role::DomainAndCategory β it's a role that hands you all the domain and category switch methods π
also, for the record, the file carries these little tags:
$Id: DomainAndCategory.pm 689 2017-08-29 21:37:38Z steffenw $
$HeadURL:
svn+ssh://steffenw@svn.code.sf.net/p/perl-gettext-oo/code/module/trunk/lib/Locale/TextDomain/OO/Role/DomainAndCategory.pm
$
β¨ VERSION β¨
1.030 β that's the one, no cap π
πΈ DESCRIPTION πΈ
this module is literally giving you domain and category switch methods plus the local scope for Locale::TextDomain:OO. that's the whole vibe π
π¦ SYNOPSIS π¦
go look at SUBROUTINES/METHODS, bestie, it's all in there π
π SUBROUTINES/METHODS π
π« method callback_scope π«
$loc->callback_scope(
sub {
# switch domain and/or category
$loc->begin_...(...);
return $loc->... # translate
},
);
}
she wraps your callback in a scope so the domain/category switching stays contained, iconic behavior fr fr β¨
π« methods begin_d, end_d π«
switch the domain, periodt.
$loc->begin_d($domain);
after this, all translations use the lexicon of that domain π
$loc->end_d;
and after end_d, all translations go back to using the lexicon from before you called begin_d. undoing the whole thing, we love a clean exit π
π« methods begin_c, end_c π«
switch the category instead, same energy.
$loc->begin_c($category);
all translations now use the lexicon of that category π
$loc->end_c;
and this one pops you back to the lexicon from before begin_c was called. chef's kiss π
π« methods begin_dc, end_dc π«
both at once?? the range?? both. domain and category, slay.
$loc->begin_dc($domain, $category);
all translations use the lexicon of that domain and category π
$loc->end_dc;
and end_dc restores the lexicon from before begin_dc was called. balance restored π§
π EXAMPLE π
inside of this distribution there's a directory named example. run this *.pl files. go run 'em, bestie, they're right there πββοΈ
π DIAGNOSTICS π
confess
cluck
π₯ CONFIGURATION AND ENVIRONMENT π₯
none β nothing to configure, she just works π
β DEPENDENCIES β
CarpLocale::TextDomain::OO::TranslatorMoo::Role
the whole squad, and she needs every one of them π«Ά
π INCOMPATIBILITIES π
not known</purl> β as far as anyone knows, she plays nice with everybody πΈ
π BUGS AND LIMITATIONS π
none β flawless, allegedly, we love that for her π
π SEE ALSO π
Locale::TextDoamin::OO β yes, that spelling is exactly what it says on the tin, do not come for me, I am but a messenger π
π AUTHOR π
Steffen Winkler
π LICENSE AND COPYRIGHT π
Copyright (c) 2017, 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.
okay that's the whole page, bestie, you ate that π
and one last lil sign-off for the girlies: this was perl v5.42.0, dated 2025-07-25, documented as Locale:...Category(3). go forth and translate, my main character ππ
β¨
π¦ where this page comes from
- fedora 43: perl-Locale-TextDomain-OO 1.036-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