=== eqv !== !~~ !eq !=== !eqv)
);
__PACKAGE__->add_same_precedence_ops( { assoc => 'left'}, qw(eq ~~ =:= !=:=) );
__PACKAGE__->add_
$dir;
for $dir.readdir.sort:{numerically} -> $fn {
my ($pugsrev, $parserrev) = $fn ~~ /(\d+)-(\d+)/ err next;
next if $XXX_handwaving($pugsrev, $parserrev); # against %?CONFI
for %StatusCode.kv -> $code, $message is copy {
$message .= uc;
$message ~~ s:g/<[ \-]>/_/;
&HTTP::Status::("RC_" ~ $message) := sub () { $code };
&H
#=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;
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
WTemplate
=cut
#use_ok('WTemplate');
skip_rest "unreliable test results"; exit;
if eval('!("a" ~~ /a/)') { skip_rest "skipped tests - rules support appears to be missing"; exit }
my $template;
my
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;
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
( 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
$ret;
}
my @pil2 = =<>;
my $pil2 = @pil2.join('');
# my $pil2 = =<>.slurp; ???
my @b = $pil2 ~~ $tokens;
# say "Tokens: ", @b.join('><');
my $ast = parse( << { >>, 'hash', << } >>, @b );
say $as
it's all just "perl 6" regardless of the runtime they are going to use on the system.
[foo.pl]
given (use (perl5:DBI | java:JDBC)) {
when /perl5/ { ... }
when /java/ { ... }
};
[foo.p6o]
-
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) {
ion. Required.
=item sense
$obj->sense;
Internal method. Iterates over all senses of the given (via init) term and returns a reference to a list of the best senses. Takes no arguments.
=item
onyms
$obj->hyponyms($synset);
Internal method. Returns a list of hyponyms (synsets) for a given (as argument) word. If the synset argument is not provided, undefined or an empty string, the met
yms
$obj->hypernyms($synset);
Internal method. Returns a list of hypernyms (synsets) for a given (as argument) word. If the synset argument is not provided, undefined or an empty string, the met
ater on.
It is possible to specify more than one field/value pair, but then the mode
should be given (but it will default to 'and' otherwise). Use as many
field/value-pairs as required. The mode can
nite strings in
parallel, though that seems a bit scary.
[Update: The C<=~> operator is renamed C<~~>, and it doesn't automatically
"any-fy" an array anymore, so we could pretty easily make it work o
backtrack over C<< <cut> >>, the entire match
will fail.)
[Update: Now we can just say C<<@lines ~~ s/^.*? \n**{2...} //>>.]
=head2 RFC 110: counting matches
I think we can avoid using any options
tingly, that can also be written:
/ <( _/\d+/ =~ 1..10 )> /
[Update: That'd be C<< <( ~/\d+/ ~~ 1..10 )> >> these days.]
=head2 RFC 198: Boolean Regexes
Again, I'm not much in favor of inventi
28"
By the way, there is also a high precedence logical xor operator in
Perl 6. You guessed it: C<~~>. This finally fills the strange gap in
Perl's logical operator set:
Binary (low) | Binar
any> Perl 6 subroutine. For
example:
sub mean (*@values : $type //= 'arithmetic') {
given ($type) {
when 'arithmetic': { return sum(@values) / @values; }
when 'geo
operators:
=over
=item *
unary C<_> is the explicit string context enforcer
=item *
binary C<~~> is high-precedence logical xor
=item *
unary C<*> is a list context specifier for parameters a
;
$name ~~ s:g/<[ _]>+/_/;
$name ~~ s:g/\W//;
$page.name = $name;
}
if $request.mode eq 'create' | 'edit' and $p<action> eq 'save' {
$.revision.attributes<kiki:content> ~~ s:g{\n}{\
king against modestring for $mode";
if $perms ~~ m:perl5/\b\Q$mode\E\(([^)]*)\)/ {
# say $ERR: " $0";
my $allowed = ~$0;
if $allowed ~~ m:perl5/(?:^| )(?:any|\Q$userpath\E)\b/ {
#
say $ERR: " OK";
return;
}
elsif $allowed ~~ m:perl5/(?:^| )-(?:any|\Q$userpath\E)\b/ {
# say $ERR: " Blocked";
last;
}
}
}
# say $ERR: " Failed--throwing excep
ry is assumed for the value C<root>. All files returned by the file system will be rooted at the given (or assumed) point. No file outside of that point is accessible.
=head1 NODE TYPES
There are th