ep (MatchTest $test ; *@values --> Lazy ) {
gather {
for @values -> $x {
take $x if $x ~~ $test;
}
}
}
# copied from S29draft.pod 8651.
multi List::join (Str $delimiter ; *@values
Pipe::open("$PIL $optional_args $tempfilename");
my $pilresult = $pilfh.readline();
$pilresult ~~ s:P5/\r//;
$pilfh.close();
unlink($tempfilename);
return $pilresult;
}
$Test::Pil::Descript
resents a
# meta-circularity issue, and it
# loops endlessly
unless $self ~~ ::Class;
return bool::false;
});
## I ended here ... to be continued
::Class.HOW.add_method
"This should never happen"}
default {
my @index = split('',$didget);
@index = grep {$_ ~~ /^<[A..Za..z0..9+\/=]>+$/},@index;
[~] map {chr ($_)}, decode(@index)}
}
}
# 1716151
( Str $iso8601 ) returns Duration::Gregorian is export {
# FIXME - missing XXXX
$iso8601 ~~ $iso8601_duration_re_anchored
or die "can't match '$iso8601' to available ISO-8601 duratio
from an iso date
multi sub date( Str $iso8601 ) returns Date::Gregorian is export {
$iso8601 ~~ $iso8601_re_anchored
or die "can't match '$iso8601' to available ISO-8601 formats";
m
% 26];
@.table[@lower[$_]] = @lower[($_ + $shift) % 26];
}
}
if $mode ~~ m:P5:i/^de/ {
my @tt;
for @.table.kv { @tt[$^value] = $^key }
@.table = @t
=== eqv !== !~~ !eq !=== !eqv)
);
__PACKAGE__->add_same_precedence_ops( { assoc => 'left'}, qw(eq ~~ =:= !=:=) );
__PACKAGE__->add_
er indicates language pref as command line argument
my Str @user_lang_prefs = @*ARGS.grep:{ $_ ~~ m/^<[a-zA-Z]>+$/ };
@user_lang_prefs = 'Eng'
if @user_lang_prefs == 0;
my Locale:
IL::Util::Pad $.parent;
has Str @.names;
method lookup_pad($name) {
if (grep { $_ ~~ $name }, @.names) {
self;
}
else {
$.parent ?? $.parent.lo
my Automata::Cellular $ca .= new(:@state, :$rule, :$steps, :$display_width);
is($ca ~~ ::Automata::Cellular, Bool::True, '$ca object instantiated');
is($ca.stage, 1,
$var_name, $var_value {
my Str $var_value_as_str = $var_value // $EMPTY_STR;
$text ~~ s:g/\<$var_name\>/$var_value_as_str/;
}
return $text;
}
################################
er indicates language pref as command line argument
my Str @user_lang_prefs = @*ARGS.grep:{ $_ ~~ m/^<[a-zA-Z]>+$/ };
@user_lang_prefs = 'Eng'
if @user_lang_prefs == 0;
my Locale:
item) returns Str {
my $str_item = ~$item;
$str_item ~= $item.WHICH()
if $str_item ~~ rx:perl5/^\<obj\:/; #/#cperl-mode--
return $str_item;
}
method insert($self: *@items) returns
b *infix:<~~> (Set $one, $member) returns Bool {
$one.includes($member);
}
# XXX -- IIRC, there's a "is commutative" or such, so duplicating shouldn't be
# necessary.
multi sub *infix:<~~> ($membe
= %*ENV<QUERY_STRING> // %*ENV<REDIRECT_QUERY_STRING>;
if ($.query_string ~~ /<[;&=]>/) {
$.query.parse_params($.query_string);
} else {
{ }
method parse (Str $str is copy) {
my $request_line;
if ($str ~~ s/^(.*)\n//) {
$request_line = $0;
} else {
$request_line = $str;
$str = "";
}
my $self = self.SUPER::parse($str);
given ($self) {
my ($method, $uri, $protocol) = $request_line.split(' ');
.meth
for %StatusCode.kv -> $code, $message is copy {
$message .= uc;
$message ~~ s:g/<[ \-]>/_/;
&HTTP::Status::("RC_" ~ $message) := sub () { $code };
&H
er .= chomp;
},
string => -> ($str) { $buffer ~= $str }
);
my $file = $?FILE;
$file ~~ s:P5/basic.t/sample.kwid/;
lives_ok {
parse($file, %events);
}, '... we parsed the sample fil
Kiss;
=cut
my $RAND = Math::Random::Kiss.new();
ok($RAND, 'new() Math::Random::Kiss');
ok($RAND ~~ Rand, 'Math::Random::Kiss does Rand');
ok($RAND.rand() >= 0, 'rand() returns numbers greater than
rules, Captures are superclasses of Match. So in the example of:
my $rv = ("x-y-z-moose" ~~ /(.)-(.)-(.)-<animal> :{ return give_birth(|$/) })
C<give_birth()> gets called with 'x', 'y', and