e = multiple_check(15, [2, 3, 5], 1);
my @div_by = multiple_check(15, [2, 3, 5]);
@div_by ~~ (3, 5) == 1;
my $num = 3;
my $is_prime = !multiple_check($num, [2..sqrt($num)]);
=head1
Uploader;
extends 'Dist::Release::Action';
our $VERSION = '0.0_5';
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub check {
my ($self) = @_;
# we have 'github' registered
q{no 'github' remote repository found})
unless 'github' ~~ @remotes;
}
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub release {
my $self = shift;
unless ( $self->di
strel->vcs->command( push => '--tags', 'github', 'master' );
}
}
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1;
__END__
=head1 NAME
Dist::Release::Action::Github - pushes rep
ref $_ ne 'HASH'
|| ( !exists $_->{$param} )
|| $value ~~ $_->{$param}
} @data;
}
$self->render_json( \@data );
};
app->start;
__DATA__
@
sses ) {
my $text = "";
my $method = $_ % 10;
my $pattern;
given ( $method ) {
when ( [ 1, 2, 3 ] ) {
while ( length $text < $length
gettimeofday() ] ) );
}
# handle error, if any
given ( $err ) {
# REJECT
when( blessed( $_ ) && $_->i
ent(id [, key1 => value1, key2 => value2, ...])
Gets, and optionally sets, the properties of a given (existing)
bibliographic entry. The optionally updated properties are provides
as a hash. The r
ion means
that the given substring will be deleted and replaced by the mark. The
given (negative) offset means that the substring must be searched
backward and that the last 20
y numbered by the printing/editing applications
and that it should be represented by the given (arbitrary) string; if
'label' is defined, it becomes the default value of 'citation';
ions of 'tar' (1.21 and up) now print record size
### to STDERR as well if v OR t is given (used to be both). This
### is a 'feature' according to the changelog, so we must no
ropped. No further handling.
#
if ( $err ) {
given ( $err ) {
# got final SPAM
when( blessed( $_ )
ge => "Could not reinject" } );
}
};
return CF_FINAL_OK unless $@;
given ( $@ ) {
# reinect failure -> save to failure dir and log
when( blessed(
t (eg RCPT TO)
=cut
sub smtp_response {
my ( $heap, $session, $cmd, $line ) = @_;
given ( $cmd ) {
when ( "EHLO" ) {
$heap->{ client }->put( 250 => 'XFORWARD NAME AD
Ref' );
=head2 require_sasl_username : CodeRef
Enable throttle module only if sasl_username is given (this happens if the SMTP connection contains AUTH information.. )
=cut
has require_sasl_userna
something different just for the main listing, specify that here. Labels
are used in the order given (blank boxes are ignored) until they run out.
At that point labels are taken from field definitio
on_non_method}->( $key, $current, $args, $depth )
if defined $args;
given ( ref $current ) {
when( 'HASH' ) {
return $opts->{key_miss}
tid> [,I<position>]);
This method adds the topic I<tid> to the view. If no position argument
is given (or if it is invalid), the topic is added at the end of the sequence.
The position argument is a
are already present in the result set
foreach my $n (@new) {
push(@d, $n) unless (grep { $n ~~ $_ } @d);
}
}
}
@d;
}
sub add_edge {
my ($self, $from, $to, $weight, $user_data) = @_;
my ( undef, @s ) = @_;
bless \ @s, $_[0];
}
sub FETCH {
my ( $self, $key ) = @_;
given ( $key ) {
when('colour') {
my $name = $self->[NAME];
my $type =
the surrounding ones, we just
# need to draw half of the segments.
return unless $segment ~~ [ qw{ e sw s se } ];
my $move = Games::RailRoad::Vector->new_dir($segment);
my $end = $po
my @wanted;
for <> -> $line {
push @wanted, $line if $line ~~ /\D/;
push @wanted, -$line if some_other_condition($line);
}
print gather {
for <> -> $line {
take $line if $line ~~ /\D/;
take -$line if some_other_condition($line);
}
${$template} );
}
else
{
$template =~ s~^\Q$_template_config{template_root}/\E~~
if $_template_config{ template_root };
$ts->set_template( $template );
}
my $rf = \$f;
Scalar::Util::weaken($rf);
unless(defined $x){ $wr->('N'); return}
given(ref $x){
when('Hessian::Type::Null') { $wr->('N') }
when('Hessian::Type::True') { $
(pack'l', first{$$x == $$refs[$_]}(0 .. $#$refs))) }
when('') { # guessing begins
given($x){
when /^[\+\-]?(0x)?\d+$/ { my $bi = Math::BigInt->new($x);
de = $h_flg unless defined $h_flg_override;
my $rf = \$f;
Scalar::Util::weaken($rf);
given($rd->(1)){
when('N') { return $h_flg_override ? Hessian::Type::Null->new() : undef }
my $rf = \$f;
Scalar::Util::weaken($rf);
unless(defined $x){ $wr->('N'); return}
given(ref $x){
when('Hessian::Type::Null') { $wr->('N') }
when('Hessian::Type::True')
(pack'l', first{$$x == $$refs[$_]}(0 .. $#$refs))) }
when('') { # guessing begins
given($x){
when /^[\+\-]?(0x)?\d+$/ { my $bi = Math::BigInt->new($x);
ned $h_flag_override;
my $rf = \$f;
Scalar::Util::weaken($rf);
my $x = $rd->(1);
given($x){
when('N') { return $h_flag_override ? Hessian::Type::Null->new() : undef }
when(