Locale::TextDomain::OO::Role::DomainAndCategory - Provides domain and category switch methods
$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 $
1.030
This module provides domain and category switch methods and the local scope for for Locale::TextDomain:OO.
see SUBROUTINES/METHODS
$loc->callback_scope( sub { # switch domain and/or category $loc->begin_...(...); return $loc->... # translate }, ); }
Switch the domain.
$loc->begin_d($domain);
All translations using the lexicon of that domain.
$loc->end_d;
All translations using the lexicon before call of begin_d.
Switch the category.
$loc->begin_c($category);
All translations using the lexicon of that category.
$loc->end_c;
All translations using the lexicon before call of begin_c.
Switch the domain and category.
$loc->begin_dc($domain, $category);
All translations using the lexicon of that domain and category.
$loc->end_dc;
All translations using the lexicon before call of begin_dc.
Inside of this distribution is a directory named example. Run this *.pl files.
confess
cluck
none
Carp
Locale::TextDomain::OO::Translator
Moo::Role
not known
Locale::TextDoamin::OO
Steffen Winkler
Copyright (c) 2017, Steffen Winkler <steffenw at cpan.org>. All rights reserved.
<steffenw at cpan.org>
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Locale::TextDomain::OO, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Locale::TextDomain::OO
CPAN shell
perl -MCPAN -e shell install Locale::TextDomain::OO
For more information on module installation, please visit the detailed CPAN module installation guide.