晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
|
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 : /usr/share/perl5/vendor_perl/Perl/ |
Upload File : |
use strict;
use warnings;
package Perl::OSType;
# ABSTRACT: Map Perl operating system names to generic types
our $VERSION = '1.010';
require Exporter;
our @ISA = qw(Exporter);
our %EXPORT_TAGS = ( all => [qw( os_type is_os_type )] );
our @EXPORT_OK = @{ $EXPORT_TAGS{all} };
# originally taken from Module::Build by Ken Williams et al.
my %OSTYPES = qw(
aix Unix
bsdos Unix
beos Unix
bitrig Unix
dgux Unix
dragonfly Unix
dynixptx Unix
freebsd Unix
linux Unix
haiku Unix
hpux Unix
iphoneos Unix
irix Unix
darwin Unix
machten Unix
midnightbsd Unix
minix Unix
mirbsd Unix
next Unix
openbsd Unix
netbsd Unix
dec_osf Unix
nto Unix
svr4 Unix
svr5 Unix
sco Unix
sco_sv Unix
unicos Unix
unicosmk Unix
solaris Unix
sunos Unix
cygwin Unix
msys Unix
os2 Unix
interix Unix
gnu Unix
gnukfreebsd Unix
nto Unix
qnx Unix
android Unix
dos Windows
MSWin32 Windows
os390 EBCDIC
os400 EBCDIC
posix-bc EBCDIC
vmesa EBCDIC
MacOS MacOS
VMS VMS
vos VOS
riscos RiscOS
amigaos Amiga
mpeix MPEiX
);
sub os_type {
my ($os) = @_;
$os = $^O unless defined $os;
return $OSTYPES{$os} || q{};
}
sub is_os_type {
my ( $type, $os ) = @_;
return unless $type;
$os = $^O unless defined $os;
return os_type($os) eq $type;
}
1;
=pod
=encoding UTF-8
=head1 NAME
Perl::OSType - Map Perl operating system names to generic types
=head1 VERSION
version 1.010
=head1 SYNOPSIS
use Perl::OSType ':all';
$current_type = os_type();
$other_type = os_type('dragonfly'); # gives 'Unix'
=head1 DESCRIPTION
=for :stopwords Unix Win32 Windows
Modules that provide OS-specific behaviors often need to know if
the current operating system matches a more generic type of
operating systems. For example, 'linux' is a type of 'Unix' operating system
and so is 'freebsd'.
This module provides a mapping between an operating system name as given by
C<$^O> and a more generic type. The initial version is based on the OS type
mappings provided in L<Module::Build> and L<ExtUtils::CBuilder>. (Thus,
Microsoft operating systems are given the type 'Windows' rather than 'Win32'.)
=head1 USAGE
No functions are exported by default. The export tag ":all" will export
all functions listed below.
=head2 os_type()
$os_type = os_type();
$os_type = os_type('MSWin32');
Returns a single, generic OS type for a given operating system name. With no
arguments, returns the OS type for the current value of C<$^O>. If the
operating system is not recognized, the function will return the empty string.
=head2 is_os_type()
$is_windows = is_os_type('Windows');
$is_unix = is_os_type('Unix', 'dragonfly');
Given an OS type and OS name, returns true or false if the OS name is of the
given type. As with C<os_type>, it will use the current operating system as a
default if no OS name is provided.
=head1 SEE ALSO
=over 4
=item *
L<Devel::CheckOS>
=back
=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
=head1 SUPPORT
=head2 Bugs / Feature Requests
Please report any bugs or feature requests through the issue tracker
at L<https://github.com/Perl-Toolchain-Gang/Perl-OSType/issues>.
You will be notified automatically of any progress on your issue.
=head2 Source Code
This is open source software. The code repository is available for
public review and contribution under the terms of the license.
L<https://github.com/Perl-Toolchain-Gang/Perl-OSType>
git clone https://github.com/Perl-Toolchain-Gang/Perl-OSType.git
=head1 AUTHOR
David Golden <dagolden@cpan.org>
=head1 CONTRIBUTORS
=for stopwords Chris 'BinGOs' Williams David Golden Graham Ollis Jonas B. Nielsen Owain G. Ainsworth Paul Green Piotr Roszatycki
=over 4
=item *
Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
=item *
David Golden <xdg@xdg.me>
=item *
Graham Ollis <plicease@cpan.org>
=item *
Jonas B. Nielsen <jonasbn@hoarfrost.local>
=item *
Owain G. Ainsworth <oga@nicotinebsd.org>
=item *
Paul Green <Paul.Green@stratus.com>
=item *
Piotr Roszatycki <piotr.roszatycki@gmail.com>
=back
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2016 by David Golden.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
__END__
# vim: ts=4 sts=4 sw=4 et: