]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Test using Locale::TextDomain API.
authorBruno Haible <bruno@clisp.org>
Sun, 7 Dec 2003 12:49:42 +0000 (12:49 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:11:28 +0000 (12:11 +0200)
gettext-tools/examples/hello-perl/hello-2.pl.in [new file with mode: 0644]

diff --git a/gettext-tools/examples/hello-perl/hello-2.pl.in b/gettext-tools/examples/hello-perl/hello-2.pl.in
new file mode 100644 (file)
index 0000000..5295459
--- /dev/null
@@ -0,0 +1,14 @@
+#!@PERL@
+# Example for use of GNU gettext.
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This file is in the public domain.
+#
+# Source code of the Perl program, using the Locale::TextDomain API.
+
+use Locale::TextDomain ("hello-perl" => "@localedir@");
+use POSIX qw(getpid);
+
+print __"Hello, world!";
+print "\n";
+print __x ("This program is running as process number {pid}.", pid => getpid());
+print "\n";