Locale::TextDomain::TiesTying all translating subs to a hash | |
Download |
Locale::TextDomain::Ties Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Publisher Name:
- Steffen Winkler
- Publisher web site:
- http://search.cpan.org/~steffenw/
Locale::TextDomain::Ties Tags
Locale::TextDomain::Ties Description
Tying all translating subs to a hash Locale::TextDomain is a Perl module that only ties a sub named &__ to a hash named %__ and a hash reference named $__ .This module shows how to tie all the other translating subs of Locale::TextDomain.This is a documentation module only. Use of this module makes no sense.SYNOPSISTie what you want. Here is one example for each sub. require Tie::Sub; tie my %__x, 'Tie::Sub', sub { return __x(shift, @_) }; tie my %__n, 'Tie::Sub', sub { return __n(shift, shift, shift) }; tie my %__nx, 'Tie::Sub', sub { return __nx(shift, shift, shift, @_) }; tie my %__xn, 'Tie::Sub', sub { return __xn(shift, shift, shift, @_) }; tie my %__p, 'Tie::Sub', sub { return __p(shift, shift) }; tie my %__px, 'Tie::Sub', sub { return __px(shift, shift, @_) }; tie my %__np, 'Tie::Sub', sub { return __np(shift, shift, shift, shift, @_) }; tie my %__npx, 'Tie::Sub', sub { return __npx(shift, shift, shift, shift, @_) }; tie my %N__, 'Tie::Sub', sub { return }; tie my %N__n, 'Tie::Sub', sub { return }; tie my %N__p, 'Tie::Sub', sub { return }; tie my %N__np, 'Tie::Sub', sub { return };The construct 'shift, @_' or 'shift, shift, @_' is necessary because the module Locale::TextDomain uses prototypes. A simple '@_' does not work. use Locale::TextDomain::Ties 1.20;%__ is already tied and exported by Locale::Text::Domain. It is the same like: tie my %__, 'Tie::Sub', sub { return __(shift) };Further information and concrete examples are in the chapter example. Requirements: · Perl
Locale::TextDomain::Ties Related Software