晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
|
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/ |
Upload File : |
package lib;
# THIS FILE IS AUTOMATICALLY GENERATED FROM lib_pm.PL.
# ANY CHANGES TO THIS FILE WILL BE OVERWRITTEN BY THE NEXT PERL BUILD.
use Config;
use strict;
my $archname = $Config{archname};
my $version = $Config{version};
my @inc_version_list = reverse split / /, $Config{inc_version_list};
our @ORIG_INC = @INC; # take a handy copy of 'original' value
our $VERSION = '0.64';
sub import {
shift;
my %names;
foreach (reverse @_) {
my $path = $_; # we'll be modifying it, so break the alias
if ($path eq '') {
require Carp;
Carp::carp("Empty compile time value given to use lib");
}
if ($path !~ /\.par$/i && -e $path && ! -d _) {
require Carp;
Carp::carp("Parameter to use lib must be directory, not file");
}
unshift(@INC, $path);
# Add any previous version directories we found at configure time
foreach my $incver (@inc_version_list)
{
my $dir = "$path/$incver";
unshift(@INC, $dir) if -d $dir;
}
# Put a corresponding archlib directory in front of $path if it
# looks like $path has an archlib directory below it.
my($arch_auto_dir, $arch_dir, $version_dir, $version_arch_dir)
= _get_dirs($path);
unshift(@INC, $arch_dir) if -d $arch_auto_dir;
unshift(@INC, $version_dir) if -d $version_dir;
unshift(@INC, $version_arch_dir) if -d $version_arch_dir;
}
# remove trailing duplicates
@INC = grep { ++$names{$_} == 1 } @INC;
return;
}
sub unimport {
shift;
my %names;
foreach my $path (@_) {
my($arch_auto_dir, $arch_dir, $version_dir, $version_arch_dir)
= _get_dirs($path);
++$names{$path};
++$names{$arch_dir} if -d $arch_auto_dir;
++$names{$version_dir} if -d $version_dir;
++$names{$version_arch_dir} if -d $version_arch_dir;
}
# Remove ALL instances of each named directory.
@INC = grep { !exists $names{$_} } @INC;
return;
}
sub _get_dirs {
my($dir) = @_;
my($arch_auto_dir, $arch_dir, $version_dir, $version_arch_dir);
$arch_auto_dir = "$dir/$archname/auto";
$arch_dir = "$dir/$archname";
$version_dir = "$dir/$version";
$version_arch_dir = "$dir/$version/$archname";
return($arch_auto_dir, $arch_dir, $version_dir, $version_arch_dir);
}
1;
__END__
=head1 NAME
lib - manipulate @INC at compile time
=head1 SYNOPSIS
use lib LIST;
no lib LIST;
=head1 DESCRIPTION
This is a small simple module which simplifies the manipulation of @INC
at compile time.
It is typically used to add extra directories to perl's search path so
that later C<use> or C<require> statements will find modules which are
not located on perl's default search path.
=head2 Adding directories to @INC
The parameters to C<use lib> are added to the start of the perl search
path. Saying
use lib LIST;
is I<almost> the same as saying
BEGIN { unshift(@INC, LIST) }
For each directory in LIST (called $dir here) the lib module also
checks to see if a directory called $dir/$archname/auto exists.
If so the $dir/$archname directory is assumed to be a corresponding
architecture specific directory and is added to @INC in front of $dir.
lib.pm also checks if directories called $dir/$version and $dir/$version/$archname
exist and adds these directories to @INC.
The current value of C<$archname> can be found with this command:
perl -V:archname
The corresponding command to get the current value of C<$version> is:
perl -V:version
To avoid memory leaks, all trailing duplicate entries in @INC are
removed.
=head2 Deleting directories from @INC
You should normally only add directories to @INC. If you need to
delete directories from @INC take care to only delete those which you
added yourself or which you are certain are not needed by other modules
in your script. Other modules may have added directories which they
need for correct operation.
The C<no lib> statement deletes all instances of each named directory
from @INC.
For each directory in LIST (called $dir here) the lib module also
checks to see if a directory called $dir/$archname/auto exists.
If so the $dir/$archname directory is assumed to be a corresponding
architecture specific directory and is also deleted from @INC.
=head2 Restoring original @INC
When the lib module is first loaded it records the current value of @INC
in an array C<@lib::ORIG_INC>. To restore @INC to that value you
can say
@INC = @lib::ORIG_INC;
=head1 CAVEATS
In order to keep lib.pm small and simple, it only works with Unix
filepaths. This doesn't mean it only works on Unix, but non-Unix
users must first translate their file paths to Unix conventions.
# VMS users wanting to put [.stuff.moo] into
# their @INC would write
use lib 'stuff/moo';
=head1 NOTES
In the future, this module will likely use File::Spec for determining
paths, as it does now for Mac OS (where Unix-style or Mac-style paths
work, and Unix-style paths are converted properly to Mac-style paths
before being added to @INC).
If you try to add a file to @INC as follows:
use lib 'this_is_a_file.txt';
C<lib> will warn about this. The sole exceptions are files with the
C<.par> extension which are intended to be used as libraries.
=head1 SEE ALSO
FindBin - optional module which deals with paths relative to the source file.
PAR - optional module which can treat C<.par> files as Perl libraries.
=head1 AUTHOR
Tim Bunce, 2nd June 1995.
C<lib> is maintained by the perl5-porters. Please direct
any questions to the canonical mailing list. Anything that
is applicable to the CPAN release can be sent to its maintainer,
though.
Maintainer: The Perl5-Porters <perl5-porters@perl.org>
Maintainer of the CPAN release: Steffen Mueller <smueller@cpan.org>
=head1 COPYRIGHT AND LICENSE
This package has been part of the perl core since perl 5.001.
It has been released separately to CPAN so older installations
can benefit from bug fixes.
This package has the same copyright and license as the perl core.
=cut