Result:
found 795 distributions and 1048 files matching your query ! ( run in 1.562 )


AnyEvent-Collect

 view release on metacpan or  search on metacpan

lib/AnyEvent/Collect.pm  view on Meta::CPAN


my @cvs;



sub collect_all(&) {
    my( $todo ) = @_;
    my $cv = AE::cv;
    Event::Wrappable->wrap_events( $todo, sub {
        my( $listener ) = @_;
        $cv->begin;

lib/AnyEvent/Collect.pm  view on Meta::CPAN

    } );
    $cv->recv;
}
*collect = *collect_all;

sub collect_any(&) {
    my( $todo ) = @_;
    my $cv = AE::cv;
    Event::Wrappable->wrap_events( $todo, sub {
        my( $listener ) = @_;
        return sub { $listener->(@_); $cv->send };

 view all matches for this distribution


AnyEvent-CouchDB

 view release on metacpan or  search on metacpan

eg/async  view on Meta::CPAN

use Data::Dump 'pp';
my $couch = couch();
my $bad   = couch('http://bad/');
my $done  = AnyEvent->condvar;

sub p(&) {
  $done->begin;
  my $code = shift;
  my $data;
  eval { $data = $code->(); };
  if ($@) {

 view all matches for this distribution


AnyEvent-DBI-Abstract-Limit

 view release on metacpan or  search on metacpan

inc/Test/Base.pm  view on Meta::CPAN

        ok $actual eq $expected,
           $name . "\n" . Text::Diff::diff(\$expected, \$actual);
    }
}

sub run(&;$) {
    (my ($self), @_) = find_my_self(@_);
    my $callback = shift;
    for my $block (@{$self->block_list}) {
        $block->run_filters unless $block->is_filtered;
        &{$callback}($block);

 view all matches for this distribution


AnyEvent-DBI-Abstract

 view release on metacpan or  search on metacpan

t/test.t  view on Meta::CPAN

use Test::More;
use Test::Requires qw(DBD::SQLite);
use AnyEvent::DBI::Abstract;

sub sync(&;&) {
    my $block = shift;
    my $cb = shift;
    my $cv = AnyEvent->condvar;
    $cv->cb(sub { $cb->($_[0]->recv) }) if $cb;
    $block->($cv);

 view all matches for this distribution


AnyEvent-DNS-EtcHosts

 view release on metacpan or  search on metacpan

lib/AnyEvent/DNS/EtcHosts.pm  view on Meta::CPAN

        }
    }
}

# helper function - unless dns delivered results, check and parse hosts, then call continuation code
sub _load_hosts_unless(&$@) {
    my ($cont, $cv, @dns) = @_;

    if (@dns) {
        $cv->end;
    } else {

 view all matches for this distribution


AnyEvent-FriendFeed-Realtime

 view release on metacpan or  search on metacpan

inc/Test/Base.pm  view on Meta::CPAN

        ok $actual eq $expected,
           $name . "\n" . Text::Diff::diff(\$expected, \$actual);
    }
}

sub run(&;$) {
    (my ($self), @_) = find_my_self(@_);
    my $callback = shift;
    for my $block (@{$self->block_list}) {
        $block->run_filters unless $block->is_filtered;
        &{$callback}($block);

 view all matches for this distribution


AnyEvent-Future

 view release on metacpan or  search on metacpan

lib/AnyEvent/Future.pm  view on Meta::CPAN

For a full description on how to use Futures, see the L<Future> documentation.

=cut

# Forward
sub as_future(&);

=head1 CONSTRUCTORS

=cut

lib/AnyEvent/Future.pm  view on Meta::CPAN

completion, and which will return a watcher object reference that needs to be
stored somewhere.

=cut

sub as_future(&)
{
   my ( $code ) = @_;

   my $f = AnyEvent::Future->new;

lib/AnyEvent/Future.pm  view on Meta::CPAN


 $w = CODE->( $done_cb, $fail_cb )

=cut

sub as_future_cb(&)
{
   my ( $code ) = @_;

   &as_future( sub {
      my $f = shift;

 view all matches for this distribution


AnyEvent-Gearman

 view release on metacpan or  search on metacpan

inc/Test/Base.pm  view on Meta::CPAN

        ok $actual eq $expected,
           $name . "\n" . Text::Diff::diff(\$expected, \$actual);
    }
}

sub run(&;$) {
    (my ($self), @_) = find_my_self(@_);
    my $callback = shift;
    for my $block (@{$self->block_list}) {
        $block->run_filters unless $block->is_filtered;
        &{$callback}($block);

 view all matches for this distribution


AnyEvent-Gmail-Feed

 view release on metacpan or  search on metacpan

inc/Test/Base.pm  view on Meta::CPAN

        ok $actual eq $expected,
           $name . "\n" . Text::Diff::diff(\$expected, \$actual);
    }
}

sub run(&;$) {
    (my ($self), @_) = find_my_self(@_);
    my $callback = shift;
    for my $block (@{$self->block_list}) {
        $block->run_filters unless $block->is_filtered;
        &{$callback}($block);

 view all matches for this distribution


AnyEvent-Hiredis

 view release on metacpan or  search on metacpan

t/Redis.pm  view on Meta::CPAN

use File::Which qw(which);

use base qw(Exporter);
our @EXPORT = qw(test_redis);

sub test_redis(&;$) {
    my $cb        = shift;
    my $args      = shift;

    my $redis_server = which 'redis-server';
    unless ($redis_server && -e $redis_server && -x _) {

 view all matches for this distribution


AnyEvent-JSONRPC-Lite

 view release on metacpan or  search on metacpan

inc/Test/Base.pm  view on Meta::CPAN

        ok $actual eq $expected,
           $name . "\n" . Text::Diff::diff(\$expected, \$actual);
    }
}

sub run(&;$) {
    (my ($self), @_) = find_my_self(@_);
    my $callback = shift;
    for my $block (@{$self->block_list}) {
        $block->run_filters unless $block->is_filtered;
        &{$callback}($block);

 view all matches for this distribution


AnyEvent-JSONRPC

 view release on metacpan or  search on metacpan

inc/Test/Base.pm  view on Meta::CPAN

        ok $actual eq $expected,
           $name . "\n" . Text::Diff::diff(\$expected, \$actual);
    }
}

sub run(&;$) {
    (my ($self), @_) = find_my_self(@_);
    my $callback = shift;
    for my $block (@{$self->block_list}) {
        $block->run_filters unless $block->is_filtered;
        &{$callback}($block);

 view all matches for this distribution


AnyEvent-MP

 view release on metacpan or  search on metacpan

MP.pm  view on Meta::CPAN

      };
   };

=cut

sub psub(&) {
   my $cb = shift;

   my $port = $SELF
      or Carp::croak "psub can only be called from within rcv or psub callbacks, not";

 view all matches for this distribution


AnyEvent-Memcached

 view release on metacpan or  search on metacpan

t/lib/Test/AE/MC.pm  view on Meta::CPAN

	*{caller().'::runtest'} = \&runtest;
	@_ = 'Test::More';
	goto &{ Test::More->can('import') };
}

sub runtest(&) {
	my $cx = shift;
	my $code = sub {
		alarm 10;
		eval {
			$cx->(@_,noreply => 1, cas => 1);

 view all matches for this distribution


AnyEvent-Pcap

 view release on metacpan or  search on metacpan

inc/Test/Base.pm  view on Meta::CPAN

        ok $actual eq $expected,
           $name . "\n" . Text::Diff::diff(\$expected, \$actual);
    }
}

sub run(&;$) {
    (my ($self), @_) = find_my_self(@_);
    my $callback = shift;
    for my $block (@{$self->block_list}) {
        $block->run_filters unless $block->is_filtered;
        &{$callback}($block);

 view all matches for this distribution


AnyEvent-Promises

 view release on metacpan or  search on metacpan

t/Utils.pm  view on Meta::CPAN

use AnyEvent;
use Test::More;

our @EXPORT = qw(run_event_loop el_subtest);

sub run_event_loop(&@) {
    my ( $code, %args ) = @_;

    my $timeout = defined $args{timeout}? $args{timeout}: 10;
    my $cv = AE::cv;
    my $tmer;

 view all matches for this distribution


AnyEvent-Redis

 view release on metacpan or  search on metacpan

t/Redis.pm  view on Meta::CPAN

use FindBin;

use base qw(Exporter);
our @EXPORT = qw(test_redis);

sub test_redis(&;$) {
    my $cb = shift;
    my $args = shift;

    chomp(my $redis_server = `which redis-server`);
    unless ($redis_server && -e $redis_server && -x _) {

 view all matches for this distribution


AnyEvent-ReverseHTTP

 view release on metacpan or  search on metacpan

inc/Test/Base.pm  view on Meta::CPAN

        ok $actual eq $expected,
           $name . "\n" . Text::Diff::diff(\$expected, \$actual);
    }
}

sub run(&;$) {
    (my ($self), @_) = find_my_self(@_);
    my $callback = shift;
    for my $block (@{$self->block_list}) {
        $block->run_filters unless $block->is_filtered;
        &{$callback}($block);

 view all matches for this distribution


AnyEvent-Watchdog

 view release on metacpan or  search on metacpan

Watchdog/Util.pm  view on Meta::CPAN

      $? = $EXIT_STATUS;
   }

}

sub on_exit(&) {
   unless ($AnyEvent::Watchdog::end) {
      $AnyEvent::Watchdog::end = \&_exit;

      push @ON_EXIT, $_[0];

 view all matches for this distribution


Aozora2Epub

 view release on metacpan or  search on metacpan

lib/Aozora2Epub/XHTML/Tree.pm  view on Meta::CPAN

    my ($self, $selector) = @_;
    $selector = _selector($selector);
    return [ $self->_result->findnodes($selector) ];
}

sub _apply(&$) { ## no critic (ProhibitSubroutinePrototypes)
    _apply0(@_);
}

sub _apply0 {
    my ($sub, $elem) = @_;

lib/Aozora2Epub/XHTML/Tree.pm  view on Meta::CPAN

        return $sub->($elem);
    }
    return $elem;
}

sub _map_apply(&@) { ## no critic (ProhibitSubroutinePrototypes)
    my ($sub, @nodes) = @_;
    return map { _apply0($sub, $_) } @nodes;
}

sub _result {

 view all matches for this distribution


App-AVR-Fuses

 view release on metacpan or  search on metacpan

t/01fuses.t  view on Meta::CPAN


use Test::More;

use App::AVR::Fuses;

sub capture(&)
{
   my $code = shift;

   open my $fh, ">", \my $output;
   my $was_outfh = select;

 view all matches for this distribution


App-CLI-Plugin-Config-YAML-Syck

 view release on metacpan or  search on metacpan

inc/Test/Base.pm  view on Meta::CPAN

        ok $actual eq $expected,
           $name . "\n" . Text::Diff::diff(\$expected, \$actual);
    }
}

sub run(&;$) {
    (my ($self), @_) = find_my_self(@_);
    my $callback = shift;
    for my $block (@{$self->block_list}) {
        $block->run_filters unless $block->is_filtered;
        &{$callback}($block);

 view all matches for this distribution


App-CLI-Plugin-DBI

 view release on metacpan or  search on metacpan

inc/Test/Base.pm  view on Meta::CPAN

        ok $actual eq $expected,
           $name . "\n" . Text::Diff::diff(\$expected, \$actual);
    }
}

sub run(&;$) {
    (my ($self), @_) = find_my_self(@_);
    my $callback = shift;
    for my $block (@{$self->block_list}) {
        $block->run_filters unless $block->is_filtered;
        &{$callback}($block);

 view all matches for this distribution


App-CLI-Plugin-Log-Dispatch-Configurator-YAML

 view release on metacpan or  search on metacpan

inc/Test/Base.pm  view on Meta::CPAN

        ok $actual eq $expected,
           $name . "\n" . Text::Diff::diff(\$expected, \$actual);
    }
}

sub run(&;$) {
    (my ($self), @_) = find_my_self(@_);
    my $callback = shift;
    for my $block (@{$self->block_list}) {
        $block->run_filters unless $block->is_filtered;
        &{$callback}($block);

 view all matches for this distribution


App-CLI-Plugin-Net-SMTP

 view release on metacpan or  search on metacpan

inc/Test/Base.pm  view on Meta::CPAN

        ok $actual eq $expected,
           $name . "\n" . Text::Diff::diff(\$expected, \$actual);
    }
}

sub run(&;$) {
    (my ($self), @_) = find_my_self(@_);
    my $callback = shift;
    for my $block (@{$self->block_list}) {
        $block->run_filters unless $block->is_filtered;
        &{$callback}($block);

 view all matches for this distribution


App-CLI-Plugin-Parallel-ForkManager

 view release on metacpan or  search on metacpan

inc/Test/Base.pm  view on Meta::CPAN

        ok $actual eq $expected,
           $name . "\n" . Text::Diff::diff(\$expected, \$actual);
    }
}

sub run(&;$) {
    (my ($self), @_) = find_my_self(@_);
    my $callback = shift;
    for my $block (@{$self->block_list}) {
        $block->run_filters unless $block->is_filtered;
        &{$callback}($block);

 view all matches for this distribution


App-CLI-Plugin-Proc-PID-File

 view release on metacpan or  search on metacpan

inc/Test/Base.pm  view on Meta::CPAN

        ok $actual eq $expected,
           $name . "\n" . Text::Diff::diff(\$expected, \$actual);
    }
}

sub run(&;$) {
    (my ($self), @_) = find_my_self(@_);
    my $callback = shift;
    for my $block (@{$self->block_list}) {
        $block->run_filters unless $block->is_filtered;
        &{$callback}($block);

 view all matches for this distribution


App-Codeowners

 view release on metacpan or  search on metacpan

t/app-codeowners.t  view on Meta::CPAN

# Set progname so that pod2usage knows how to find the script after we chdir.
$0 = path($Bin)->parent->child('bin/git-codeowners')->absolute->stringify;

$ENV{NO_COLOR} = 1;

sub run(&) { ## no critic (Subroutines::ProhibitSubroutinePrototypes)
    my $code = shift;
    capture { exit_code { $code->() } };
}

subtest 'basic options' => sub {

 view all matches for this distribution


App-Colorist

 view release on metacpan or  search on metacpan

lib/App/Colorist/Ruleset.pm  view on Meta::CPAN

    as_is => [ qw( ruleset rule ) ],
);

our $BUILDING_RULESET;

sub ruleset(&) {
    my $code = shift;

    $BUILDING_RULESET = [];
    $code->();
    

 view all matches for this distribution


App-Getconf

 view release on metacpan or  search on metacpan

lib/App/Getconf.pm  view on Meta::CPAN

Subroutine should return C<TRUE> when option value should be accepted,
C<FALSE> otherwise.

=cut

sub opt_sub(&) {
  my ($sub) = @_;

  return opt { check => $sub };
}

 view all matches for this distribution


( run in 1.562 second using v1.01-cache-2.11-cpan-49f99fa48dc )