|ARRAY
[0.26] Alternative host components which indicate the same virtual host. When
'AUTO' is given (the default since [0.28]), then L<generateAliases()|Any::Daemon::HTTP::VirtualHost/"Attributes">
ce, C<< 'foo' ~~ $nameset >> invokes
C<< $nameset->contains('foo') >>. This is inspired by the Raku behaviour,
in which C<< $x ~~ $y >> calls C<< $y.ACCEPTS($x) >>
NOTE: C<< $nameset ~~ 'foo' >> (ob
far as I can tell, even 5.27.7 would have supported the
C<< 'foo' ~~ $nameset >> form.
=cut
use overload
fallback => 1,
'~~' => sub {
#my ($self, $other, $swap) = @_;
$_[0]-
atch)} ]);
}
sub opt_type_atom {
my $atom = shift;
my ($name,$value) = flat($atom);
given ($name) {
when ('Spec') {
return opt_type_spec($value);
}
when ('More') {
_atom {
my ($rule,$t) = @_;
my ($name,$atoms) = flat($rule);
if (not($name ~~ ['Str','End'])) {
given ($name) {
when ('Rules') {
lint_type_atoms($atoms,$t);
}
rule);
}
sub match_type_rule {
my ($t,$rule) = @_;
my ($name,$value) = flat($rule);
given ($name) {
when ('Rules') {
return match_type_rules($t,$value);
}
when ('Bra
ts = grep { $_ eq 'foo' } @ary;
Another alternative is using smartmatch:
my $foo_exists = 'foo' ~~ @ary;
but smartmatch is now in experimental status and might be removed in the future.
Plus the a
ew( [$hashref] )
Create and return a new empty L<SVN::Dump::Headers> object.
If C<$hashref> is given (it can be a blessed hash reference), the
keys from the hash are used to initialise the headers.
[$n+1],0,$ds) eq substr($x[$n],0,$ds); #hm
croak "Could not resolve, perhaps too little time given ($sec), iteratons=$n"
if $sec>0 and ($Resolve_time=time_fp()-$time_start)>$sec;
#warn "
# 0
print in( 'a', 'A','B','C','a'); # 1
I guess in perl 5.10 or perl 6 you could use the C<< ~~ >> operator instead.
=head2 in_num
Just as sub L</in>, but for numbers. Internally uses the perl
->{$rule->long} = []
if $rule->is_list && !defined $self->{'options'}->{$rule->long};
given($rule->type) {
when('s') {
}
when('i') {
$self->error('Argument "%s" to "-
$self->error('Value "%s" to argument "--%s" is invalid.', $arg, $rule->long)
unless $arg ~~ @{$rule->values || []};
}
}
if ($rule->is_list) {
if ('?' ne $rule->type) { ##
{
push @{$self->{'options'}->{$rule->long}}, $arg
unless ($rule->keep_unique && $arg ~~ @{$self->{'options'}->{$rule->long}});
}
$rule->mark_used;
next PROCESS_ARGUMENTS
my @valid_lists = sort($mpd->collection->all_playlists);
for my $list(@lists) {
if($list ~~ @valid_lists) {
next;
}
else {
my @choices = ();
for my $valid(@valid_l
ices;
}
elsif($answer eq 'current') {
return(undef);
}
if($answer ~~ @valid_lists) {
$list = $answer;
}
# Make sure the number selected is in fact
s = @_;
my @lists = $mpd->collection->all_playlists;
map { s/^\s+//m } @lists;
return ($_[0] ~~ @lists) ? 1 : 0;
}
sub escape {
my $str = shift;
$str =~ s/([;<>*|`&\$!#()[\]{}:'" ])/\\$1/g;
add_to) {
push @needs_add, $_ unless $_ ~~ $cur_groups;
}
for (@$del_from) {
push @needs_del, $_ if $_ ~~ $cur_groups;
}
if (@needs_add ||
ess $group ~~ @$member_of;
my $not_member_of = $args{not_member_of} // [];
for (@$member_of) {
return [400, "Group $_ is in member_of and not_member_of"]
if $_ ~~ @$not_mem
if $l->{group} ~~ @$member_of && !($user ~~ @mm);
push @needs_del, $l->{group}
if $l->{group} ~~ @$not_member_of && ($user ~~ @mm);
}
elsif (/\G ((?>\s+)|\#.*) /oxgc) { return $1; }
# if (, elsif (, unless (, while (, until (, given (, and when (
# given, when
# P.225 The given Statement
# in Chapter 15: Smart Matc
Operators
# of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
# (and so on)
# ~~
# P.221 The Smart Match Operator
# in Chapter 15: Smart Matching and given-when
# of
-0-596-00492-7 Programming Perl 4th Edition.
# (and so on)
elsif (/\G ((?>
!~~ | !~ | != | ! |
%= | % |
&&= | && | &= | &\.= | &\. | & |
-= |
elsif (/\G ((?>\s+)|\#.*) /oxgc) { return $1; }
# if (, elsif (, unless (, while (, until (, given (, and when (
# given, when
# P.225 The given Statement
# in Chapter 15: Smart Matc
Operators
# of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
# (and so on)
# ~~
# P.221 The Smart Match Operator
# in Chapter 15: Smart Matching and given-when
# of
-0-596-00492-7 Programming Perl 4th Edition.
# (and so on)
elsif (/\G ((?>
!~~ | !~ | != | ! |
%= | % |
&&= | && | &= | &\.= | &\. | & |
-= |
elsif (/\G ((?>\s+)|\#.*) /oxgc) { return $1; }
# if (, elsif (, unless (, while (, until (, given (, and when (
# given, when
# P.225 The given Statement
# in Chapter 15: Smart Matc
Operators
# of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
# (and so on)
# ~~
# P.221 The Smart Match Operator
# in Chapter 15: Smart Matching and given-when
# of
-0-596-00492-7 Programming Perl 4th Edition.
# (and so on)
elsif (/\G ((?>
!~~ | !~ | != | ! |
%= | % |
&&= | && | &= | &\.= | &\. | & |
-= |
_add_implicit_to_given_when_blocks {
# given($foo)
# when($bar) means when ($foo ~~ $bar)
# when(\@list) means when ($foo ~~ \@list)
# when(&func) means
n element
# if there is an "implicit smart match",
# insert << $_ ~~ >> at the beginning of the struct
my $given_child = $given->find('PPI::Structure::Given') or
$e eq '<=>' || $e eq 'cmp' || $e eq '!' || $e eq 'not' ||
$e eq '^' || $e eq 'xor' || $e eq '~~' || $e eq '..')) {
$is_implicit_smart_match = 0;
last;
} elsif (ref($e) =~ /::Regexp/) {
elsif (/\G ((?>\s+)|\#.*) /oxgc) { return $1; }
# if (, elsif (, unless (, while (, until (, given (, and when (
# given, when
# P.225 The given Statement
# in Chapter 15: Smart Matc
Operators
# of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
# (and so on)
# ~~
# P.221 The Smart Match Operator
# in Chapter 15: Smart Matching and given-when
# of
-0-596-00492-7 Programming Perl 4th Edition.
# (and so on)
elsif (/\G ((?>
!~~ | !~ | != | ! |
%= | % |
&&= | && | &= | &\.= | &\. | & |
-= |
elsif (/\G ((?>\s+)|\#.*) /oxgc) { return $1; }
# if (, elsif (, unless (, while (, until (, given (, and when (
# given, when
# P.225 The given Statement
# in Chapter 15: Smart Matc
Operators
# of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
# (and so on)
# ~~
# P.221 The Smart Match Operator
# in Chapter 15: Smart Matching and given-when
# of
-0-596-00492-7 Programming Perl 4th Edition.
# (and so on)
elsif (/\G ((?>
!~~ | !~ | != | ! |
%= | % |
&&= | && | &= | &\.= | &\. | & |
-= |
elsif (/\G ((?>\s+)|\#.*) /oxgc) { return $1; }
# if (, elsif (, unless (, while (, until (, given (, and when (
# given, when
# P.225 The given Statement
# in Chapter 15: Smart Matc
Operators
# of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
# (and so on)
# ~~
# P.221 The Smart Match Operator
# in Chapter 15: Smart Matching and given-when
# of
-0-596-00492-7 Programming Perl 4th Edition.
# (and so on)
elsif (/\G ((?>
!~~ | !~ | != | ! |
%= | % |
&&= | && | &= | &\.= | &\. | & |
-= |
elsif (/\G ((?>\s+)|\#.*) /oxgc) { return $1; }
# if (, elsif (, unless (, while (, until (, given (, and when (
# given, when
# P.225 The given Statement
# in Chapter 15: Smart Matc
Operators
# of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
# (and so on)
# ~~
# P.221 The Smart Match Operator
# in Chapter 15: Smart Matching and given-when
# of
-0-596-00492-7 Programming Perl 4th Edition.
# (and so on)
elsif (/\G ((?>
!~~ | !~ | != | ! |
%= | % |
&&= | && | &= | &\.= | &\. | & |
-= |
elsif (/\G ((?>\s+)|\#.*) /oxgc) { return $1; }
# if (, elsif (, unless (, while (, until (, given (, and when (
# given, when
# P.225 The given Statement
# in Chapter 15: Smart Matc
Operators
# of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
# (and so on)
# ~~
# P.221 The Smart Match Operator
# in Chapter 15: Smart Matching and given-when
# of
-0-596-00492-7 Programming Perl 4th Edition.
# (and so on)
elsif (/\G ((?>
!~~ | !~ | != | ! |
%= | % |
&&= | && | &= | &\.= | &\. | & |
-= |
elsif (/\G ((?>\s+)|\#.*) /oxgc) { return $1; }
# if (, elsif (, unless (, while (, until (, given (, and when (
# given, when
# P.225 The given Statement
# in Chapter 15: Smart Matc
Operators
# of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
# (and so on)
# ~~
# P.221 The Smart Match Operator
# in Chapter 15: Smart Matching and given-when
# of
-0-596-00492-7 Programming Perl 4th Edition.
# (and so on)
elsif (/\G ((?>
!~~ | !~ | != | ! |
%= | % |
&&= | && | &= | &\.= | &\. | & |
-= |
elsif (/\G ((?>\s+)|\#.*) /oxgc) { return $1; }
# if (, elsif (, unless (, while (, until (, given (, and when (
# given, when
# P.225 The given Statement
# in Chapter 15: Smart Matc
Operators
# of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
# (and so on)
# ~~
# P.221 The Smart Match Operator
# in Chapter 15: Smart Matching and given-when
# of
-0-596-00492-7 Programming Perl 4th Edition.
# (and so on)
elsif (/\G ((?>
!~~ | !~ | != | ! |
%= | % |
&&= | && | &= | &\.= | &\. | & |
-= |