path);
for =$fh -> $line {
$start = 1 if $line ~~ rx:perl5/^=pod/;
if $start { $expected_output ~= "$line\n" }
$start = 0 if $line ~~ rx:perl5/^=cut/;
}
$fh.close();
$expected_outp
method BUILD() {
self.add_handler("PRIVMSG", -> $event {
my $sent_to_a_chan = $event<object> ~~ rx:Perl5/^[#+&]/;
# Only record if the message was sent to a channel.
%!seen{self.nor
te => time,
text => $event<rest>,
} if $sent_to_a_chan;
if $public and $event<rest> ~~ rx:Perl5/^\?seen\s+([^ ]+)/ {
my $reply_to = $sent_to_a_chan ?? $event<object> !! $event<fro
sh()
It returns a string that is the English version of the given language or if nothing is given (or an invalid langauage) then it returns the current source language's name.
my $source
if ($format eq "latex"){print $outputFH $latex->endFile};
}
#only work if the text files are given (not only the alignment files).
sub getSize {
my $alSet = shift;
my ($file,$factor);
my $size;
|
|-----------------------------------|
| ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |~~
$comments,
===================================
.
write STDOUT;
in Perl 6 we
har><1,$width>) /;
# Squeeze the resultant substring...
(my $result = $1) ~~ s:each/ <$ws> | \v+ /\c[SPACE]/;
# Check for any more data still to come...
r:
sub expurgate (Str *@hidewords) {
return sub (Str $data is rw) {
$data ~~ s:ei/(@hidewords)/$( 'X' x length $1 )/;
return $data;
}
}
We could then
C<when> statement, because:
when $is_sheep { push @sheep, $_ }
is equivalent to:
if $_ ~~ $is_sheep { push @sheep, $_; next }
When C<$is_sheep> is a subroutine reference, that implicit sm
my $context = want;
if $context ~~ List {
my @values = block();
return { *@values };
}
elsif $context ~~ Scalar {
my $value = block();
=item * C<=~> becomes the "smart match" operator C<~~>, with a whole new set
of semantics. Anywhere you used C<=~> before you now use C<~~>, but C<~~> is
much more general now. See L<Synopsis 4> for
<=~> >> macro which always fails at
compile time with a message directing the user either to use C<~~> or C<~=> instead,
or to put a space between if they really wanted to assign a stringified value.)
smartmatches the
endpoints in the domain of the object being matched, so C<< 1.5 ~~
1^..^2 >> is true. (But C<< 2.1 ~~ 1..2 >> is false.)
=item * The unary C<^> operator generates a range from C<0>
readme.txt' => 'README',
);
my @Tempfiles = qw(
pod2htmd.tmp
pod2htmd.x~~
pod2htmi.tmp
pod2htmi.x~~
);
use strict;
use File::Copy;
local $/;
foreach my $target (keys %TEXT) {
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
for %StatusCode.kv -> $code, $message is copy {
$message .= uc;
$message ~~ s:g/<[ \-]>/_/;
&HTTP::Status::("RC_" ~ $message) := sub () { $code };
&H
= %*ENV<QUERY_STRING> // %*ENV<REDIRECT_QUERY_STRING>;
if ($.query_string ~~ /<[;&=]>/) {
$.query.parse_params($.query_string);
} else {
t';
@INC = '../lib';
# Don't interfere with the taintedness of %ENV, this could perturbate tests
%ENV<PERL_CORE> = 1 unless $*TAINT;
$0 ~~ s/\.dp$//; # for the test.deparse make target
1;
( 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
#=Beispielverknüpfungen
$a != $b;
$a ~~ $b; # smart-match, mehr dazu gleich
#=Verknüpfungen in Perl 5:
$a < $b && $b <= $c;
$a > $b && $b >= $c;
#=Perl 6: Verkettung ist möglich:
$a < $b <= $c;
{ }
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
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
d y $& ab
a(?{"{"}})b - c - Unmatched right curly bracket
a(?{$bl="\{"}).b caxbd y $bl {
x(~~)*(?:(?:F)?)? x~~ y - -
^a(?#xxx){3}c aaac y $& aaac
'^a (?#xxx) (?#yyy) {3}c'x aaac y $& aaac
(?<![cd])b d
"This should never happen"}
default {
my @index = split('',$didget);
@index = grep {$_ ~~ /^<[A..Za..z0..9+\/=]>+$/},@index;
[~] map {chr ($_)}, decode(@index)}
}
}
# 1716151
IL::Util::Pad $.parent;
has Str @.names;
method lookup_pad($name) {
if (grep { $_ ~~ $name }, @.names) {
self;
}
else {
$.parent ?? $.parent.lo
% 26];
@.table[@lower[$_]] = @lower[($_ + $shift) % 26];
}
}
if $mode ~~ m:P5:i/^de/ {
my @tt;
for @.table.kv { @tt[$^value] = $^key }
@.table = @t