tem Matcher
subset Matcher of Item | Junction;
Used to supply a test to match against. Assume C<~~> will be used against it.
=item Ordering
subset KeyExtractor of Code where { .sig === :(Any -->
e where { .sig === :(Any, Any --> Int ) };
subset OrderingPair of Pair where { .left ~~ KeyExtractor && .right ~~ Comparator };
subset Ordering where Signature | KeyExtractor | Comparator | Orderin
f C<@array>, in order.
If C<@indextests> are provided, only elements whose indices match
C<$index ~~ any(@indextests)> are iterated.
What is returned at each element of the iteration varies with fun
for %attrs.keys.sort -> $key {
my $copy = lc $key;
$copy ~~ s:P5:g/_/-/;
my $value = ($escape) ?? simple_escape(%attrs{$key}) !! %att
scape (Str $string is copy) returns Str {
$string ~~ s:P5:g/&/&/;
$string ~~ s:P5:g/</</;
$string ~~ s:P5:g/>/>/;
$string ~~ s:P5:g/"/"/;
return $string;
}
1;
ctly C<Play()> it.
The second (and third) form opens the
wave output device with the format given
(or if none given, defaults to 44.1kHz,
16 bits, stereo); to produce something
audible you can
$var (keys %{$to_instantiate||{}}){
my $class = $to_instantiate->{$var};
given(ref $class){
when('HASH'){
my ($package, $method) = %$class;
exit; # exit child
}
}
};
method _req_handler($req) {
my $res = eval {
given($req->uri){
when(m{^/(?:index(?:[.]html?)?)?$}){
return $self->_rende
to HTML
=head1 SYNOPSIS
use Text::GooglewikiFormat;
my $raw = '*bold* _italic_ ~~strike~~';
my $html = Text::GooglewikiFormat::format($raw);
# $html is qq~<p><strong>bold</st
_function_from_definition {
my ($package, $function, $fdef, $shift, $precondition) = @_;
given(ref $fdef){
when('ARRAY'){
my @fdef = @$fdef;
my $func;
= $plugin->upper_bound($port);
Returns the maximum value for the $port, or C<undef> if none is given (assume 1).
Also L</is_sample_rate|see is_sample_rate>.
=head2 is_sample_rate
my $max = $plug
ne = $fh.readline;
last unless $line.defined; # exit as soon as possible
if ($line ~~ rx:P5/^=kwid/) {
$is_parsing = 1;
%events<start_document>();
}
fined($_line) &&
!($_line ~~ rx:P5/^\n$/) &&
$_line ~~ rx:P5/^\s(.*?)$/ ) {
while (defined($_line) &&
!($_line ~~ rx:P5/^\n$/) ) {
interpolate($_line, %events);
"~~" . $::CLASS->name . "~~";
}
}
};
my $pp = $PrettyPrinter->new();
isa_ok($pp, 'PrettyPrinter');
is($pp->pretty(), '~~PrettyPrinter~~', '.
is(
$pp->pretty({ array => [ \1, \'two', $pp ] }),
'{ array => [ 1, two, ~~PrettyPrinter~~ ] }',
'... recursive multi-methods');
}
{
my $PrettyPrinter2 = class '
ty = ::multi_sub 'PrettyPrinter2::pretty' => ('PrettyPrinter2') => sub {
"~~" . $::CLASS->name . "~~";
};
$::CLASS->add_method('pretty' => ::make_method($pret
~~ m/^(\Q$const\E)(.*)/s;
# return unless @_[0] ~~ perl5:m:s:/^(\Q$const\E)(.*)/;
# return unless @_[0] ~~ /^ ( $const )(.*)/; # (putter on #perl6)
# return unless @_[0] ~~
e($n) {
'subset int'~$n~' of ValueType where { $^n ~~ Int and -2**'~$n~' <= $^n < 2**'~$n~' };
subset uint'~$n~' of ValueType where { $^n ~~ Int and 0 <= $^n <= 2**'~$n~' };'
}
Clutter
ize($n) {
'subset num'~$n~' of ValueType where { $^n ~~ Num and ...XXXfill in... };
subset complex'~$n~' of ValueType where { $^n ~~ Num and ...XXXfill in... };'
}
Clutter::num_size 32;
Clutt
ne = $fh.readline;
last unless $line.defined; # exit as soon as possible
if ($line ~~ rx:P5/^=pod/) {
$is_parsing = 1;
%events<start_document>();
}
efined($_line) &&
!($_line ~~ rx:P5/^$/) &&
$_line ~~ rx:P5/^\s(.*?)$/ ) {
while (defined($_line) &&
!($_line ~~ rx:P5/^$/) ) {
interpolate($_line, %events);
*@indextests --> Int|List )
{
my @ret;
for @array.kv -> ($k, $v) {
push(@ret, $k ) if $k ~~ any(@indextests);
}
@ret; # want Item ?? +@ret !! *@ret;
}
# signature from S29draft.pod r
ests --> Int|List )
{
my @ret;
for @array.keys -> $k {
push(@ret, ($k,@array[$k]) ) if $k ~~ any(@indextests);
}
@ret; # want Item ?? +@ret !! *@ret;
}
# signature from S29draft.pod r
*@indextests )
{
my @ret;
for @array.keys -> $k {
push(@ret, Pair($k,@array[$k]) ) if $k ~~ any(@indextests);
}
@ret; # want Item ?? +@ret !! *@ret;
}
# signature from S29draft.pod r
{ }
method parse (Str $str is copy) {
my $status_line;
if ($str ~~ s/^(.*)\n//) {
$status_line = $0;
} else {
$status_line = $str;
elf = self.SUPER::parse($str);
given ($self) {
my ($protocol, $code, $message);
if ($status_line ~~ /^\d**{3}/) {
# Looks like a r
# HTTP/1.0
require URI;
if ($base.defined && $base ~~ /^ <URI::scheme> \:/) {
# already absolute
return $HTTP::URI_CLASS.new($ba
Perl 6: generalisierter Smart-Match-Operator
$s ~~ 1978;
$s ~~ "Hallo, Welt";
$s ~~ /regex/;
$s !~ funktion();
#=Alles zusammen: (änlich wie any)
$s ~~ (123, funktion, /regex/)
($a, $b, $c) !~ ($d, $
est = =$hdl;
$request ~~ s:P5/\s+$//;
#diag $request;
if ($request ~~ rx:P5"^GET /stop-server/") {
last();
};
while (readline($hdl) ~~ rx:P5/\S/) { 1 };
$h
-)
# threads while running an external command)
for @urls -> $t_url {
my $url = $t_url;
$url ~~ s:perl5/%s/$base_url/;
my $inc = map {qq! "-I$_"!}, @*INC;
# Will block forever
# my $outpu
~~ m/^(\Q$const\E)(.*)/s;
# return unless @_[0] ~~ perl5:m:s:/^(\Q$const\E)(.*)/;
# return unless @_[0] ~~ /^ ( $const )(.*)/; # (putter on #perl6)
# return unless @_[0] ~~
or more arguments
are given, returns a list of table objects with those names, in the
same order given (or the number of such tables in a scalar context,
but this isn't terribly useful).
An L<C<Alzab
=> 0,
'tmpdir' => "$ENV{HOME}/.sdb/syntax/",
'command' => 'cat %f | perl -I ~ ~/viewperl.pl'
},
mode = 0 (no highlight), 1 (highlight)
tmpdir - syntax highlight requir
nes to list (a windowful).
$incr = $window - 1;
# Set the start to the argument given (if there was one).
$start = $1 if $1;
# Back up by the context amount.
key of the item
=head2 $element->value
The prepared value of the item, if a prepare method was given (otherwise, this is just the original item)
=head2 $element->rank
The rank of the item in the s