NAME
Locale::Maketext::TieHash::nbsp - Tying subroutine to a hash
SYNOPSIS
use strict;
use Locale::Maketext::TieHash::nbsp;
tie my %nbsp, 'Locale::Maketext::TieHash::nbsp';
# print: "15 pieces";
print $nbsp{15 pices};
# If you want to test your Script, store you yours own test subroutine.
# Change Whitespace to a string which you see in the Browser.
$nbsp{sub} = sub {
(local $_ = $_[1]) =~ s/ /<span style="color:red">§</span>/g;
};
DESCRIPTION
Subroutines don't have interpreted into strings. The module ties a subroutine to a hash. The Subroutine is executed at fetch hash. At long last this is the same, only the notation is shorter.
Sometimes the subroutine "
sub"
expects more than 1 parameter. Then submit a reference on an array as hash key.
SEE ALSO
Locale::Maketext
Locale::Maketext::TieHash::L10N
Locale::Maketext::TieHash::quant
AUTHOR
Steffen Winkler, <cpan@steffen-winkler.de>
COPYRIGHT AND LICENSE
Copyright (C) 2004, 2005 by Steffen Winkler
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.6.1 or, at your option, any later version of Perl 5 you may have available.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 57:
Non-ASCII character seen before =encoding in 'style="color:red">§</span>/g;'. Assuming CP1252