AnyEvent-Callback
view release on metacpan or search on metacpan
t/010-ae-cb.t view on Meta::CPAN
#!/usr/bin/perl
use warnings;
use strict;
use utf8;
use open qw(:std :utf8);
use lib qw(lib ../lib);
use Test::More tests => 36;
use Encode qw(decode encode);
BEGIN {
# ÐодгоÑовка обÑекÑа ÑеÑÑиÑÐ¾Ð²Ð°Ð½Ð¸Ñ Ð´Ð»Ñ ÑабоÑÑ Ñ utf8
my $builder = Test::More->builder;
binmode $builder->output, ":utf8";
binmode $builder->failure_output, ":utf8";
binmode $builder->todo_output, ":utf8";
use_ok 'AnyEvent::Callback';
}
#
my ($called, $ecalled, $child_called, $child_ecalled, @res, @err) = (0) x 4;
my $cb = CB { $called++ };
isa_ok $cb => 'AnyEvent::Callback';
ok eval { $cb->(); 1 }, 'calling callback';
cmp_ok $called, '~~', 1, 'callback was called once';
t/020-pod.t view on Meta::CPAN
#!/usr/bin/perl
use warnings;
use strict;
use utf8;
use open qw(:std :utf8);
use lib qw(lib ../lib);
BEGIN {
use Test::More;
eval 'use Test::Pod 1.00';
plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
};
all_pod_files_ok( all_pod_files );
t/030-ae-cbs.t view on Meta::CPAN
#!/usr/bin/perl
use warnings;
use strict;
use utf8;
use open qw(:std :utf8);
use lib qw(lib ../lib);
use Test::More tests => 28;
use Encode qw(decode encode);
BEGIN {
# ÐодгоÑовка обÑекÑа ÑеÑÑиÑÐ¾Ð²Ð°Ð½Ð¸Ñ Ð´Ð»Ñ ÑабоÑÑ Ñ utf8
my $builder = Test::More->builder;
binmode $builder->output, ":utf8";
binmode $builder->failure_output, ":utf8";
binmode $builder->todo_output, ":utf8";
use_ok 'AnyEvent::Callback';
use_ok 'AnyEvent';
}
for my $cv (AE::cv) {
my @res;
my $cbs = CBS;
$cbs->wait(sub { @res = @_; $cv->send });
( run in 1.044 second using v1.01-cache-2.11-cpan-49f99fa48dc )