Debian Codegraph @

lib/HTML/FormHandler/I18N.pm

raw
1 package HTML::FormHandler::I18N;
2 # ABSTRACT: internationalization
3 $HTML::FormHandler::I18N::VERSION = '0.410002';
4 use strict;
5 use warnings;
6 use base ('Locale::Maketext');
7 use Try::Tiny;
8
9 sub maketext {
10 my ( $lh, @message ) = @_;
11 return '' unless scalar @message;
12 return '' unless defined $message[0];
13 my $out;
14 try {
15 $out = $lh->SUPER::maketext(@message);
16 }
17 catch {
18 die "Unable to do maketext on: " . $message[0] .
19 "\nIf the message contains brackets you may need to escape them with a tilde.";
20 };
21 return $out;
22 }
23
24 1;
25
26 __END__
27
28 =pod
29
30 =encoding UTF-8
31
32 =head1 NAME
33
34 HTML::FormHandler::I18N - internationalization
35
36 =head1 VERSION
37
38 version 0.410002
39
40 =head1 AUTHOR
41
42 FormHandler Contributors - see HTML::FormHandler
43
44 =head1 COPYRIGHT AND LICENSE
45
46 This software is copyright (c) 2017 by Gerda Shank.
47
48 This is free software; you can redistribute it and/or modify it under
49 the same terms as the Perl 5 programming language system itself.
50
51 =cut