summaryrefslogtreecommitdiff
path: root/ext/I18N/Langinfo/Langinfo.pm
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-07-08 13:53:38 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-07-08 13:53:38 +0000
commit74c7603757455e9ae40e2976bf9b439d7ba8be55 (patch)
tree5ced04351e5fa9da56adedc4f05707bad2b511d9 /ext/I18N/Langinfo/Langinfo.pm
parent642c2bac5c7334dca0875b93260705d7aed619bd (diff)
downloadperl-74c7603757455e9ae40e2976bf9b439d7ba8be55.tar.gz
Fix I18N::Langinfo nits noticed but Philip Newton.
p4raw-id: //depot/perl@11211
Diffstat (limited to 'ext/I18N/Langinfo/Langinfo.pm')
-rw-r--r--ext/I18N/Langinfo/Langinfo.pm27
1 files changed, 16 insertions, 11 deletions
diff --git a/ext/I18N/Langinfo/Langinfo.pm b/ext/I18N/Langinfo/Langinfo.pm
index 79f8a14e01..39f216ff85 100644
--- a/ext/I18N/Langinfo/Langinfo.pm
+++ b/ext/I18N/Langinfo/Langinfo.pm
@@ -11,8 +11,9 @@ use AutoLoader;
our @ISA = qw(Exporter DynaLoader);
+our @EXPORT = qw(langinfo);
+
our @EXPORT_OK = qw(
- langinfo
ABDAY_1
ABDAY_2
ABDAY_3
@@ -112,14 +113,17 @@ I18N::Langinfo - query locale information
=head1 DESCRIPTION
-The langinfo() function queries various locale information that
-can be used to localize output and user interfaces.
+The langinfo() function queries various locale information that can be
+used to localize output and user interfaces. The langinfo() requires
+one numeric argument that identifies the locale constant to query:
+if no argument is supplied, C<$_> is used. The numeric constants
+appropriate to be used as arguments are exportable from I18N::Langinfo.
-The following example will import the langinfo() function itself
-(implicitly) and (explicitly) three constants to be used as arguments
-to langinfo(): a constant for the abbreviated first day of the week (the
-numbering starts from Sunday 1) and two more constant for the affirmative
-and negative answers for a yes/no question in the current locale.
+The following example will import the langinfo() function itself and
+three constants to be used as arguments to langinfo(): a constant for
+the abbreviated first day of the week (the numbering starts from
+Sunday = 1) and two more constants for the affirmative and negative
+answers for a yes/no question in the current locale.
use I18N::Langinfo qw(langinfo ABDAY_1 YESSTR NOSTR);
@@ -127,9 +131,10 @@ and negative answers for a yes/no question in the current locale.
print "$abday_1? [$yesstr/$nostr] ";
-In other words, in the "C" (or English) locale the above will probably print:
+In other words, in the "C" (or English) locale the above will probably
+print something like:
- Sun? [y/n]
+ Sun? [yes/no]
The usually available constants are
@@ -162,7 +167,7 @@ radix character (yes, this is redundant with POSIX::localeconv())
for the affirmative and negative responses and expressions, and
- ERA ERA_D_FMT ERA_D_T_FMT ETA_T_FMT
+ ERA ERA_D_FMT ERA_D_T_FMT ERA_T_FMT
for the Japanese Emperor eras (naturally only defined under Japanese locales).