view release on metacpan or search on metacpan
local/lib/perl5/MooseX/Has/Sugar/Saccharin.pm view on Meta::CPAN
## no critic (ProhibitBuiltinHomonyms)
sub default(&) {
my $code = shift;
return (
'default',
sub {
my $self = $_[0];
local/lib/perl5/MooseX/Has/Sugar/Saccharin.pm view on Meta::CPAN
sub trigger(&) {
my $code = shift;
return (
'trigger',
sub {
my $self = $_[0];
view all matches for this distribution
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
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
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
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
view release on metacpan or search on metacpan
inc/Plack/Builder.pm view on Meta::CPAN
our $_add = our $_add_if = our $_mount = sub {
Carp::croak("enable/mount should be called inside builder {} block");
};
sub enable { $_add->(@_) }
sub enable_if(&$@) { $_add_if->(@_) }
sub mount {
my $self = shift;
if (Scalar::Util::blessed($self)) {
$self->_mount(@_);
}else{
$_mount->($self, @_);
}
}
sub builder(&) {
my $block = shift;
my $self = __PACKAGE__->new;
my $mount_is_called;
view all matches for this distribution
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
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
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
view release on metacpan or search on metacpan
inc/Test/Base.pm view on Meta::CPAN
ok $actual eq $expected, $name;
diag 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
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
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
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
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
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
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
view release on metacpan or search on metacpan
t/04-disk.t view on Meta::CPAN
my $warned;
$SIG{__WARN__} = sub {
$warned = 1;
goto &diag;
};
sub warnings_are(&$;$) {
my($sub, $exp, $out) = @_;
my @got;
local $SIG{__WARN__} = sub {
push @got, join '', @_;
};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Plucene/TestCase.pm view on Meta::CPAN
if not specified, the value from C<$ANALYZER>, which in turn defaults to
C<Plucene::Analysis::SimpleAnalyzer>, will be used.
=cut
sub new_index(&;$) {
my ($block, $analyzer) = @_;
$analyzer ||= $ANALYZER;
# UNIVERSAL::require loads UNIVERSAL->import, which won't do.
eval "require $analyzer";
lib/Plucene/TestCase.pm view on Meta::CPAN
Same as C<new_index>, but doesn't create a new index, rather re-uses an
old one.
=cut
sub re_index(&;$) {
my ($block, $analyzer) = @_;
$analyzer ||= $ANALYZER;
eval "require $analyzer";
die "Couldn't require $analyzer" if $@;
$WRITER = Plucene::Index::Writer->new($DIR, $analyzer->new, 0);
view all matches for this distribution
view release on metacpan or search on metacpan
Prima/Spinner.pm view on Meta::CPAN
$self->update_value;
$self->repaint;
}
sub _pairwise(&$)
{
my ($sub, $p) = @_;
my @p;
for ( my $i = 0; $i < @$p; $i += 2 ) {
push @p, $sub->($p->[$i], $p->[$i+1]);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Proc/Fork.pm view on Meta::CPAN
sub _croak { require Carp; goto &Carp::croak }
my $do_clear = 1;
my ( $parent, $child, $error, $retry );
sub run_fork(&) {
my $setup = shift;
my @r = $setup->();
_croak "Garbage in Proc::Fork setup (semicolon after last block clause?)" if @r;
$do_clear = 1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Proc/ParallelLoop.pm view on Meta::CPAN
@Exit_Status @Reusable_Handles $Readset $Max_Workers);
###########################################################################
# Subroutine prototypes
sub pardo(&&&;$);
sub pareach($&;$);
sub init_state();
sub wait_for_available_queue($);
sub make_names();
sub dispatch($$);
lib/Proc/ParallelLoop.pm view on Meta::CPAN
# Public methods follow.
###########################################################################
# pardo -- Like a for loop, but with parallelization.
sub pardo(&&&;$) {
my ($test, $update, $routine, $options) = (shift, shift, shift, shift);
my $result;
init_state();
if (defined $options->{"Max_Workers"}) {
$Max_Workers=$options->{"Max_Workers"};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ProgressBar/Stack.pm view on Meta::CPAN
sub update_progress(;$$) {
$curprogress->update(@_);
}
sub sub_progress(&$) {
return $curprogress->sub(@_);
}
sub for_progress(&@) {
$curprogress->for(@_);
}
sub map_progress(&@) {
return $curprogress->map(@_);
}
sub reduce_progress(&@) {
return $curprogress->reduce(@_);
}
sub file_progress(&*) {
return $curprogress->file(@_);
}
sub push_progress($$) {
$curprogress->push(@_);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Promises/Sub.pm view on Meta::CPAN
use parent 'Exporter';
our @EXPORT_OK = qw/ defer /;
sub defer(&) {
my $coderef = shift;
return sub {
collect( @_ )->then( sub { $coderef->( map { @$_ } @_ ) } );
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Prophet/Test.pm view on Meta::CPAN
}
sub as_alice (&) { as_user( alice => shift ) }
sub as_bob (&) { as_user( bob => shift ) }
sub as_charlie(&) { as_user( charlie => shift ) }
sub as_david(&) { as_user( david => shift ) }
# END {
# for (qw(alice bob charlie david)) {
# # as_user( $_, sub { rmtree [ $ENV{'PROPHET_REPO'} ] } );
view all matches for this distribution
view release on metacpan or search on metacpan
t/control-frame.t view on Meta::CPAN
}
}
sub unhex($) { join '', map { chr hex } split ' ', shift }
sub double_check(&$) {
my $code = shift;
my $data = shift;
my $sender_zlib = Protocol::SPDY::Compress->new;
ok(my $original = Protocol::SPDY::Frame->parse(\unhex $data, zlib => $sender_zlib), 'parse frame');
control_frame_ok($original);
view all matches for this distribution
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
view release on metacpan or search on metacpan
lib/Quantum/Superpositions/Lazy.pm view on Meta::CPAN
unless is_collapsible($_);
$_->collapse;
} @superpositions;
}
sub any_state(&)
{
my ($sub) = @_;
return run_sub_as $sub, reducer_type => "any";
}
sub every_state(&)
{
my ($sub) = @_;
return run_sub_as $sub, reducer_type => "all";
}
sub one_state(&)
{
my ($sub) = @_;
return run_sub_as $sub, reducer_type => "one";
}
sub fetch_matches(&)
{
my ($sub) = @_;
return run_sub_as $sub, compare_bool => 0;
}
sub with_sources(&)
{
my ($sub) = @_;
return run_sub_as $sub, sourced_calculations => 1;
}
view all matches for this distribution
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
view release on metacpan or search on metacpan
package RCU::Config::Parser;
my $def;
my @def;
sub def(&) {
my $sub = shift;
push @def, $def;
$def = $def ? {%$def} : {};
&$sub;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/RFID/Reader.pm view on Meta::CPAN
use warnings;
use Carp;
# Prototype
sub uniq(&@);
sub _init
{
my $self = shift;
lib/RFID/Reader.pm view on Meta::CPAN
my $sub = shift;
local($a,$b)=@_;
$sub->();
}
sub uniq(&@)
{
my($cmpsub, @list)=@_;
my $last = shift @list
or return ();
my @ret =($last);
view all matches for this distribution