晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
|
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 : /proc/thread-self/root/usr/share/perl5/vendor_perl/App/Prove/State/Result/ |
Upload File : |
package App::Prove::State::Result::Test;
use strict;
use warnings;
=head1 NAME
App::Prove::State::Result::Test - Individual test results.
=head1 VERSION
Version 3.42
=cut
our $VERSION = '3.42';
=head1 DESCRIPTION
The C<prove> command supports a C<--state> option that instructs it to
store persistent state across runs. This module encapsulates the results for a
single test.
=head1 SYNOPSIS
# Re-run failed tests
$ prove --state=failed,save -rbv
=cut
my %methods = (
name => { method => 'name' },
elapsed => { method => 'elapsed', default => 0 },
gen => { method => 'generation', default => 1 },
last_pass_time => { method => 'last_pass_time', default => undef },
last_fail_time => { method => 'last_fail_time', default => undef },
last_result => { method => 'result', default => 0 },
last_run_time => { method => 'run_time', default => undef },
last_todo => { method => 'num_todo', default => 0 },
mtime => { method => 'mtime', default => undef },
seq => { method => 'sequence', default => 1 },
total_passes => { method => 'total_passes', default => 0 },
total_failures => { method => 'total_failures', default => 0 },
parser => { method => 'parser' },
);
while ( my ( $key, $description ) = each %methods ) {
my $default = $description->{default};
no strict 'refs';
*{ $description->{method} } = sub {
my $self = shift;
if (@_) {
$self->{$key} = shift;
return $self;
}
return $self->{$key} || $default;
};
}
=head1 METHODS
=head2 Class Methods
=head3 C<new>
=cut
sub new {
my ( $class, $arg_for ) = @_;
$arg_for ||= {};
bless $arg_for => $class;
}
=head2 Instance Methods
=head3 C<name>
The name of the test. Usually a filename.
=head3 C<elapsed>
The total elapsed times the test took to run, in seconds from the epoch..
=head3 C<generation>
The number for the "generation" of the test run. The first generation is 1
(one) and subsequent generations are 2, 3, etc.
=head3 C<last_pass_time>
The last time the test program passed, in seconds from the epoch.
Returns C<undef> if the program has never passed.
=head3 C<last_fail_time>
The last time the test suite failed, in seconds from the epoch.
Returns C<undef> if the program has never failed.
=head3 C<mtime>
Returns the mtime of the test, in seconds from the epoch.
=head3 C<raw>
Returns a hashref of raw test data, suitable for serialization by YAML.
=head3 C<result>
Currently, whether or not the test suite passed with no 'problems' (such as
TODO passed).
=head3 C<run_time>
The total time it took for the test to run, in seconds. If C<Time::HiRes> is
available, it will have finer granularity.
=head3 C<num_todo>
The number of tests with TODO directives.
=head3 C<sequence>
The order in which this test was run for the given test suite result.
=head3 C<total_passes>
The number of times the test has passed.
=head3 C<total_failures>
The number of times the test has failed.
=head3 C<parser>
The underlying parser object. This is useful if you need the full
information for the test program.
=cut
sub raw {
my $self = shift;
my %raw = %$self;
# this is backwards-compatibility hack and is not guaranteed.
delete $raw{name};
delete $raw{parser};
return \%raw;
}
1;