view release on metacpan or search on metacpan
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : 0
}
},
"runtime" : {
"requires" : {
"AnyEvent" : 0,
"AnyEvent::Strict" : 0,
"Scalar::Util" : 0,
"Test::Exception" : 0,
"Test::More" : 0
}
}
},
"release_status" : "stable",
"version" : "0.0805"
}
version: 1.4
name: AE-AdHoc
no_index:
directory:
- t
- inc
requires:
AnyEvent: 0
AnyEvent::Strict: 0
Scalar::Util: 0
Test::Exception: 0
Test::More: 0
version: 0.0805
Makefile.PL view on Meta::CPAN
WriteMakefile(
NAME => 'AE::AdHoc',
AUTHOR => q{Konstantin S. Uvarin <khedin@gmail.com>},
VERSION_FROM => 'lib/AE/AdHoc.pm',
ABSTRACT_FROM => 'lib/AE/AdHoc.pm',
($ExtUtils::MakeMaker::VERSION >= 6.3002
? ('LICENSE'=> 'perl')
: ()),
PL_FILES => {},
PREREQ_PM => {
'Test::More' => 0,
'Test::Exception' => 0,
'AnyEvent' => 0,
'AnyEvent::Strict' => 0,
'Scalar::Util' => 0,
},
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
clean => { FILES => 'AE-AdHoc-*' },
);
t/00-load.t view on Meta::CPAN
#!perl -T
use Test::More tests => 1;
BEGIN {
use_ok( 'AE::AdHoc' ) || print "Bail out!
";
}
diag( "Testing AE::AdHoc $AE::AdHoc::VERSION, Perl $], $^X" );
t/10-basic.t view on Meta::CPAN
#!/usr/bin/perl -w
use strict;
use Test::More tests => 9;
use Test::Exception;
use AE::AdHoc;
throws_ok {
ae_recv { ; } 0.01;
} qr(Timeout), "empty body => reach timeout => die";
lives_and {
is ((ae_recv { ae_send->(137); } 0.01), 137 );
} "plain ae_send is fine";
t/11-begin-end.t view on Meta::CPAN
#!/usr/bin/perl -w
use strict;
use Test::More;
use Test::Exception;
use AE::AdHoc;
my @timers;
plan tests => 5;
lives_ok {
my $timer;
ae_recv {
t/12-nested-dies.t view on Meta::CPAN
#!/usr/bin/perl -w
use strict;
use Test::More;
use Test::Exception;
use AE::AdHoc;
$AE::AdHoc::warnings = 0;
plan tests => 1;
throws_ok {
ae_recv {
ae_recv {
} 1;
} 2;
t/13-null-timeout.t view on Meta::CPAN
#!/usr/bin/perl -w
use strict;
use Test::More;
use Test::Exception;
use AE::AdHoc;
my @warn;
$SIG{__WARN__} = sub { push @warn, shift };
plan tests => 4;
throws_ok {
ae_recv{ };
t/14-xargs.t view on Meta::CPAN
#!/usr/bin/perl -w
use strict;
use Test::More tests => 5;
use Test::Exception;
use AE::AdHoc;
my @list;
my $scalar;
@list = ae_recv {
ae_send(1..5)->(6..10);
} 0.01;
t/15-goals.t view on Meta::CPAN
#!/usr/bin/perl -w
use strict;
use Test::More tests => 5;
use Test::Exception;
use AnyEvent::Strict;
use Data::Dumper;
use AE::AdHoc;
my $result;
throws_ok {
ae_goal("foo");
} qr(outside), "no ae_recv = no go";
t/16-goals2.t view on Meta::CPAN
#!/usr/bin/perl -w
use strict;
use Test::More tests => 8;
use Test::Exception;
use AE::AdHoc;
throws_ok {
ae_recv {
ae_goal("never");
ae_goal("always")->();
} 0.1;
} qr(^Timeout), "Goals not done, sorry";
is_deeply( AE::AdHoc->results, { always => [] }, "1 goal done");
t/17-goals-leftover.t view on Meta::CPAN
#!/usr/bin/perl -w
use strict;
use Test::More tests => 3;
use Data::Dumper;
use AE::AdHoc;
$AE::AdHoc::warnings = 0;
my $timer;
ae_recv {
$timer = AnyEvent->timer( after => 0, cb => ae_goal("pollute") );
ae_send->("return right now");
} 0.1;
t/18-all-leftover.t view on Meta::CPAN
#!/usr/bin/perl -w
use strict;
use Test::More tests => 5;
use Test::Exception;
use AE::AdHoc;
$AE::AdHoc::warnings = 0;
my $sub;
ae_recv { $sub = ae_send; ae_send->("stop now"); } 0.01;
lives_ok { $sub->() } "Don't die if event loop MAY exist";
like ($AE::AdHoc::errstr, qr(Leftover.*outside), "Error was catched");
note $AE::AdHoc::errstr;
t/19-soft-timeout.t view on Meta::CPAN
#!/usr/bin/perl -w
use strict;
use Test::More tests => 2;
use Test::Exception;
use AE::AdHoc;
lives_ok {
ae_recv { } soft_timeout => 0.1
} "soft timeout";
throws_ok {
ae_recv { } timeout => 0.1
} qr(Timeout.*seconds), "hard timeout in options";
t/20-ae_action.t view on Meta::CPAN
#!/usr/bin/perl -w
use strict;
use Test::More tests => 5;
use Test::Exception;
use AE::AdHoc;
my @res;
ae_recv {
ae_action { push @res, @_ } after=>0.03, interval =>0.1;
} soft_timeout=>0.2;
is_deeply (\@res, [ 0, 1 ], "Timer fired twice");
t/boilerplate.t view on Meta::CPAN
#!perl -T
use strict;
use warnings;
use Test::More tests => 3;
sub not_in_file_ok {
my ($filename, %regex) = @_;
open( my $fh, '<', $filename )
or die "couldn't open $filename for reading: $!";
my %violated;
while (my $line = <$fh>) {
while (my ($desc, $regex) = each %regex) {
t/manifest.t view on Meta::CPAN
#!perl -T
use strict;
use warnings;
use Test::More;
unless ( $ENV{RELEASE_TESTING} ) {
plan( skip_all => "Author tests not required for installation" );
}
eval "use Test::CheckManifest 0.9";
plan skip_all => "Test::CheckManifest 0.9 required" if $@;
ok_manifest();
t/pod-coverage.t view on Meta::CPAN
use strict;
use warnings;
use Test::More;
# Ensure a recent version of Test::Pod::Coverage
my $min_tpc = 1.08;
eval "use Test::Pod::Coverage $min_tpc";
plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage"
if $@;
# Test::Pod::Coverage doesn't require a minimum Pod::Coverage version,
# but older versions don't recognize some common documentation styles
my $min_pc = 0.18;
eval "use Pod::Coverage $min_pc";
plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage"
if $@;
all_pod_coverage_ok();
#!perl -T
use strict;
use warnings;
use Test::More;
# Ensure a recent version of Test::Pod
my $min_tp = 1.22;
eval "use Test::Pod $min_tp";
plan skip_all => "Test::Pod $min_tp required for testing POD" if $@;
all_pod_files_ok();
view all matches for this distributionview release on metacpan - search on metacpan