晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
|
Server : Apache System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64 User : rainic ( 1014) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /lib64/perl5/I18N/ |
Upload File : |
package I18N::Langinfo;
use 5.006;
use strict;
use warnings;
use Carp;
require Exporter;
require XSLoader;
our @ISA = qw(Exporter);
our @EXPORT = qw(langinfo);
our @EXPORT_OK = qw(
ABDAY_1
ABDAY_2
ABDAY_3
ABDAY_4
ABDAY_5
ABDAY_6
ABDAY_7
ABMON_1
ABMON_10
ABMON_11
ABMON_12
ABMON_2
ABMON_3
ABMON_4
ABMON_5
ABMON_6
ABMON_7
ABMON_8
ABMON_9
ALT_DIGITS
AM_STR
CODESET
CRNCYSTR
DAY_1
DAY_2
DAY_3
DAY_4
DAY_5
DAY_6
DAY_7
D_FMT
D_T_FMT
ERA
ERA_D_FMT
ERA_D_T_FMT
ERA_T_FMT
MON_1
MON_10
MON_11
MON_12
MON_2
MON_3
MON_4
MON_5
MON_6
MON_7
MON_8
MON_9
NOEXPR
NOSTR
PM_STR
RADIXCHAR
THOUSEP
T_FMT
T_FMT_AMPM
YESEXPR
YESSTR
);
our $VERSION = '0.13';
XSLoader::load();
1;
__END__
=head1 NAME
I18N::Langinfo - query locale information
=head1 SYNOPSIS
use I18N::Langinfo;
=head1 DESCRIPTION
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 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);
my ($abday_1, $yesstr, $nostr) =
map { langinfo($_) } (ABDAY_1, YESSTR, NOSTR);
print "$abday_1? [$yesstr/$nostr] ";
In other words, in the "C" (or English) locale the above will probably
print something like:
Sun? [yes/no]
but under a French locale
dim? [oui/non]
The usually available constants are
ABDAY_1 ABDAY_2 ABDAY_3 ABDAY_4 ABDAY_5 ABDAY_6 ABDAY_7
ABMON_1 ABMON_2 ABMON_3 ABMON_4 ABMON_5 ABMON_6
ABMON_7 ABMON_8 ABMON_9 ABMON_10 ABMON_11 ABMON_12
DAY_1 DAY_2 DAY_3 DAY_4 DAY_5 DAY_6 DAY_7
MON_1 MON_2 MON_3 MON_4 MON_5 MON_6
MON_7 MON_8 MON_9 MON_10 MON_11 MON_12
for abbreviated and full length days of the week and months of the year,
D_T_FMT D_FMT T_FMT
for the date-time, date, and time formats used by the strftime() function
(see L<POSIX>)
AM_STR PM_STR T_FMT_AMPM
for the locales for which it makes sense to have ante meridiem and post
meridiem time formats,
CODESET CRNCYSTR RADIXCHAR
for the character code set being used (such as "ISO8859-1", "cp850",
"koi8-r", "sjis", "utf8", etc.), for the currency string, for the
radix character used between the integer and the fractional part
of decimal numbers (yes, this is redundant with POSIX::localeconv())
YESSTR YESEXPR NOSTR NOEXPR
for the affirmative and negative responses and expressions, and
ERA ERA_D_FMT ERA_D_T_FMT ERA_T_FMT
for the Japanese Emperor eras (naturally only defined under Japanese locales).
See your L<langinfo(3)> for more information about the available
constants. (Often this means having to look directly at the
F<langinfo.h> C header file.)
Note that unfortunately none of the above constants are guaranteed
to be available on a particular platform. To be on the safe side
you can wrap the import in an eval like this:
eval {
require I18N::Langinfo;
I18N::Langinfo->import(qw(langinfo CODESET));
$codeset = langinfo(CODESET()); # note the ()
};
if ($@) { ... failed ... }
=head2 EXPORT
By default only the C<langinfo()> function is exported.
=head1 SEE ALSO
L<perllocale>, L<POSIX/localeconv>, L<POSIX/setlocale>, L<nl_langinfo(3)>.
The langinfo() is just a wrapper for the C nl_langinfo() interface.
=head1 AUTHOR
Jarkko Hietaniemi, E<lt>jhi@hut.fiE<gt>
=head1 COPYRIGHT AND LICENSE
Copyright 2001 by Jarkko Hietaniemi
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=cut