Result:
found 19 distributions and 29 files matching your query ! ( run in 2.041 )


AnyEvent-Callback

 view release on metacpan or  search on metacpan

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


    my $new_cb = $cb->CB(sub { ... }, sub { ... }); # the same

=cut

sub CB(&;&) {

    my $parent;
    my ($cb, $ecb) = @_;

    ($parent, $cb, $ecb) = @_ unless 'CODE' eq ref $cb;

 view all matches for this distribution


Attribute-Types

 view release on metacpan or  search on metacpan

test.pl  view on Meta::CPAN


my $n=0;
my $report;
sub report { $report .= join "", @_ }
#sub report { print @_ }
sub ok(&)  { $n++; eval { $_[0]->(); 1 } or report "not "; report "ok $n\n"}
sub nok(&) { $n++; !eval { $_[0]->(); 1 } or report "not "; report "ok $n\n" }
END { print "1..$n\n$report" }

{
	my $x : INTEGER;

 view all matches for this distribution


Bot-Backbone

 view release on metacpan or  search on metacpan

lib/Bot/Backbone/DispatchSugar.pm  view on Meta::CPAN

sub parameter($@) {
    my ($name, %config) = @_;
    push @$WITH_ARGS, [ $name, \%config ];
}

sub as(&) { 
    my $code = shift;
    return $code;
}

sub _respond { 

 view all matches for this distribution


Class-Usul

 view release on metacpan or  search on metacpan

lib/Class/Usul/Functions.pm  view on Meta::CPAN

         my $y = $x; $y = $f->( $y, shift ) while (@_); return $y;
      }
   }
}

sub Y (&) {
   my $f = shift; return sub { $f->( Y( $f ) )->( @_ ) };
}

sub factorial ($) {
   return Y( sub (&) {

 view all matches for this distribution


Devel-Decouple

 view release on metacpan or  search on metacpan

lib/Devel/Decouple.pm  view on Meta::CPAN

    my %map = map { $_ => $code } @{$functions};
    
    return %map, %args;
}

sub as(&) {
    return shift;
}

sub default_sub() {
    return '_DEFAULT_';

 view all matches for this distribution


FFI-Platypus

 view release on metacpan or  search on metacpan

t/ffi_probe.t  view on Meta::CPAN

use Capture::Tiny qw( capture_merged );
use FFI::Temp;
use File::Basename qw( basename );
use Config;

sub n (&)
{
  my($code) = @_;
  my($out, @ret) = capture_merged {
    $code->();
  };

 view all matches for this distribution


FSM-Basic

 view release on metacpan or  search on metacpan

lib/FSM/Basic.pm  view on Meta::CPAN

  caseinsensitive
  alternation
);


sub qp(&){
    my $s;
    open local *STDOUT, '>', \$s or die "open in-memory file: $!";
    &{$_[0]};
    die $@ if $@;
    $s;

 view all matches for this distribution


FunctionalPerl

 view release on metacpan or  search on metacpan

lib/FP/Trampoline.pm  view on Meta::CPAN

our @EXPORT_OK   = qw();
our %EXPORT_TAGS = (all => [@EXPORT, @EXPORT_OK]);

use FP::Carp;

sub T (&) {
    bless $_[0], "FP::Trampoline::Continuation"
}

sub TC {
    bless [@_], "FP::Trampoline::Call"

 view all matches for this distribution


GrowthForecast-Aggregator-Declare

 view release on metacpan or  search on metacpan

lib/GrowthForecast/Aggregator/Declare.pm  view on Meta::CPAN

our @EXPORT = qw(gf section db db_multi callback);

our $_SECTION;
our @_QUERIES;

sub gf(&) {
    local @_QUERIES;
    $_[0]->();
    return @_QUERIES;
}

 view all matches for this distribution


List-oo

 view release on metacpan or  search on metacpan

lib/List/oo.pm  view on Meta::CPAN


=back

=cut

sub F (&) {
  my $sub = CORE::shift(@_);
  @_ and croak;
  UNIVERSAL::isa($sub, 'CODE') and return($sub);
  eval($sub->isa('List::oo')) and croak 'not a method';
  croak('why bother');

 view all matches for this distribution


Nasm-X86

 view release on metacpan or  search on metacpan

lib/Nasm/X86.pm  view on Meta::CPAN

   }
 }

#D1 Structured Programming                                                      # Structured programming constructs

sub If(&;&)                                                                     # If
 {my ($then, $else) = @_;                                                       # Then - required , else - optional
  @_ >= 1 or confess;
  if (@_ == 1)                                                                  # No else
   {Comment "if then";
    my $end = Label;

 view all matches for this distribution


Params-PatternMatch

 view release on metacpan or  search on metacpan

lib/Params/PatternMatch.pm  view on Meta::CPAN


our $VERSION = '0.01';

our @args;

sub as(&) { @_ }

sub case {
  my $action = pop;
  Carp::croak('Not a CodeRef.') if ref $action ne 'CODE';

 view all matches for this distribution


Storable-AMF

 view release on metacpan or  search on metacpan

t/06-aux-utility.t  view on Meta::CPAN

}
eval 'use Test::More tests => 6+6;';
use warnings;
no warnings 'once';
our $msg;
sub tt(&);
sub tt(&){
    my $sub = shift;
    my $s = ref_mem_safe( $sub );
    $msg = $s;
    return ($s)if $s;
    return undef;

 view all matches for this distribution


Sub-Go

 view release on metacpan or  search on metacpan

lib/Sub/Go.pm  view on Meta::CPAN

    my $self = ${ $self_ref };
    $self->{yielded} = 1;
    $self->{rest}->{code}->( @_ );
}

sub go(&;@) {
    my $code = shift;
    my $rest = shift;
    
    return bless { code => $code, rest => $rest }, __PACKAGE__;
}

sub by(&;@) {
    my ( $code, $rest ) = @_;
    return bless { code => $code, rest => $rest, by => 1 }, __PACKAGE__;
}

1;

 view all matches for this distribution


Test-Kantan

 view release on metacpan or  search on metacpan

lib/Test/Kantan.pm  view on Meta::CPAN

        stuff   => $stuff,
        builder => Test::Kantan->builder
    );
}

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

    if ($HAS_DEVEL_CODEOBSERVER) {
        state $observer = Devel::CodeObserver->new();
        my ($retval, $result) = $observer->call($code);

 view all matches for this distribution


Text-Soundex

 view release on metacpan or  search on metacpan

t/basic.t  view on Meta::CPAN

exit 0;


my $test_label;

sub t (&)
{
    my($test_f) = @_;
    $test_label = undef;
    eval {&$test_f};
    my $ok = $@ ? "not ok" : "ok";

 view all matches for this distribution


UR

 view release on metacpan or  search on metacpan

lib/UR/Context/Transaction.pm  view on Meta::CPAN

    return eval_or_do($is_failure, @_);
}

# do function takes a block (&) sort of like CORE::do
# do will rollback on a false result as well as before re-throwing a caught die
sub do(&) {
    my $is_failure = sub {
        my ($result, $eval_error) = @_;
        return !$result || $eval_error;
    };
    my ($result, $eval_error) = eval_or_do($is_failure, @_);

 view all matches for this distribution


UUID

 view release on metacpan or  search on metacpan

t/5persist/bare.t  view on Meta::CPAN


require UUID;

ok 1, 'loaded';

sub t (&) {
    local $SIG{__WARN__} = sub {};
    my $t = shift;
    my ($rv, $err);
    $rv = try { $t->() } catch { $err = $_; undef };
    return $rv, $err;

 view all matches for this distribution


XML-Bits

 view release on metacpan or  search on metacpan

lib/XML/Bits.pm  view on Meta::CPAN


  T{tag => [%atts], @content};

=cut

sub T (&) {
  my ($sub) = @_;
  my @what = $sub->();
  #warn "what: (@what)\n";
  foreach my $item (@what) {
    $item = __PACKAGE__->new('', $item) unless(ref($item));

 view all matches for this distribution


( run in 2.041 seconds using v1.01-cache-2.11-cpan-8f98c5d2c55 )