eq | ne | lt | le | gt | ge
| == | != | < | <= | > | >=
| =~ | !~ | ~~
) \Z }x;
my $expected_code = $test_code;
my ($got_code, $comparator);
for m
ed[0];
ok $result eq $expected[0];
ok $result == $expected->[0]->{a}[0];
ok $result ~~ $expected[0];
ok $result !~ $expected[0];
ok $result > twice($expected{'half'});
=hea
$result --> 1
# $expected->[0]->{a}[0] --> undef
#
ok 4 - $result ~~ $expected[0]
not ok 5 - $result !~ $expected[0]
# Failed test at demo/ts_ok-er.pl line 1
/^ ( (?: (?: ~~ )*+ ~ \[ | [^\[] )++ ) /x;
$raw //= '';
if (length $raw) {
$text =~ s/^ ( (?: (?: ~~ )*+ ~ \[ | [^\[] )++ ) //gx;
# Fix up escapes
$raw =~ s/(?:~~)*+\K~\[/[/g;
$raw =~ s/(?:~~)*+\K~,/,/g;
$raw =~ s/~~/~/g;
# Escape stuff for perl
$raw =~ s/\\/\\\\/g;
$raw =~ s/'/\\'/g;
$sub .= ", '$raw'";
}
last unless length $tex
$method =~ s/ \[ \s* (.*?) \s* \] /$1/x;
# sort out ~, and ~~
$method =~ s/(?:~~)*+\K~,/\x{00}/g;
$method =~ s/~~/~/g;
($method, my @params) = split /,/, $method;
# if $is_p
meta = $Aion::META{$pkg};
my $extends = $meta->{extends} // return "";
return 1 if $class ~~ $extends;
for my $extender (@$extends) {
return 1 if $extender->isa($class);
}
elf;
my $meta = $Aion::META{$pkg};
my $does = $meta->{with} // return "";
return 1 if $role ~~ $does;
for my $doeser (@$does) {
return 1 if $doeser->can("does") && $doeser->does($ro
output items; if item is a reference, will print dump
=cut
sub debug {
my $layer = $_[0] && $_[0] ~~ @Layer_const ? shift : DefaultLayer;
# drop the layer prefix to print in a config-fasion manner
tput OFF
=cut
sub _verbose {
my $layer = shift;
my $conf = Crop->C->{debug};
return 1 unless $conf->{output} eq 'On';
return unless exists $conf->{layer};
$layer ~~ @{$conf->{layer}};
}
1;
output items; if item is a reference, will print dump
=cut
sub debug {
my $layer = $_[0] && $_[0] ~~ @Layer_const ? shift : DefaultLayer;
# drop the layer prefix to print in a config-fasion manner
tput OFF
=cut
sub _verbose {
my $layer = shift;
my $conf = Crop->C->{debug};
return 1 unless $conf->{output} eq 'On';
return unless exists $conf->{layer};
$layer ~~ @{$conf->{layer}};
}
1;
{
return $_[0]->{postfix} // q~~ if !defined $_[1];
$_[0]->{postfix} = $_[1];
return $_[0]->{postfix};
}
sub prefix {
return $_[0]->{prefix} // q~~ if !defined $_[1];
$_[0]->{pre
my @mro = @{ mro::get_linear_isa( ref $obj ) };
for my $class ( @mro ) {
my $name = "$class\::(~~";
my $overload = do {
no strict 'refs';
exists( &$name ) ? \&$name : undef;
};
return
if (match($this, $that))
{
say "$this matches $that";
}
=head2 Differences with ~~
There were major changes to smart match between 5.10.0 and 5.10.1. This
module attempts to emulat
smart's operator does not.
@foo ~~ %bar # means: \@foo ~~ \%bar
@foo |M| %bar # means: scalar(@foo) |M| scalar(%bar)
If you want the C<< \@foo ~~ \%bar >> behaviour, you need to add
lters, [$f, $ftype, "~~", $args->{"$f.has"}, $ftype, $cic];
}
if (defined $args->{"$f.lacks"}) {
$exists++;
push @filters, [$f, $ftype, "!~~", $args->{"$f.lacks
q 'truth') {
next REC if $r_h->{$f} xor $opn;
} elsif ($op eq '~~') {
if ($stringy) {
if ($cic) {
} @{$r_h->{$f}};
}
}
} elsif ($op eq '!~~') {
if ($stringy) {
if ($cic) {
'eq' => sub{ &_op_overload( @_, 'IS' ) },
# Full Text Search operator
'~~' => sub{ &_op_overload( @_, '@@' ) },
fallback => 1,
);
use Want;
our $VERS
are overloaded:
+, -, *, /, %, <, <=, >, >=, !=, <<, >>, lt, gt, le, ge, ne, &, |, ^, ==, eq, ~~
Thus a field named "dummy" could be used like:
$f + 10
which would become:
dummy + 10
ceholder in:
$f == "'JPY'"
Simply provide:
$f == '?'
You can use the search operator C<~~> for SQL Full Text Search and it would be converted into C<@@>:
Let's imagine a table C<articles>
if ($expect.defined && $expect ~~ m/ "\r\n" /) {
my $r = $expect;
my $n = $expect;
$n ~~ s:g{ "\r\n" } = "\n";
func;
use warnings 'uninitialized';
# next unless $fld_func ~~ $whs[$i][2];
my $l = $whs[$i][1];
next if ((ref $l eq 'ARR
Y' ? "@$l" : $l) ne (ref $fld eq 'ARRAY' ? "@$fld" : $fld));
# next unless $fld ~~ $whs[$i][1];
push @ary, $class->_build_where_piece($me, $bind, @{splice @whs,
"0\n\0",
"\0\n\0",
);
my %exp;
for @pat -> $pat {
my $x = $pat;
$x ~~ s:g/\0/\\0/;
$x ~~ s:g/\n/\\n/;
%exp{$pat} = $x;
}
my Str @line = ("", Str, "0\n", "", "\0\0\n0")
);
my $n = +$f;
ok ($n ~~ Num, "Undefined in Numeric context type");
is ($n.defined, False, "Undefined in Numeric context defined");
my $s = ~$f;
ok ($s ~~ Str, "U
@targets) {
for my $key (keys %hash) {
say "$key: $hash{$key}" if $key ~~ $target;
}
}
}
could be called like so:
show_targets( \%records, [qr
@targets) {
for my $key (keys %hash) {
say "$key: $hash{$key}" if $key ~~ $target;
}
}
}
which would then be called like so:
show_targets( fro
get (@targets) {
for my $key (keys %hash) {
delete $hash{$key} if $key ~~ $target;
}
}
}
which would then be called like so:
# Modify $input
shift(@via_main);
# FIXME cannot smartmatch $stop since it became an object
# if ( $stop ~~ \@via_show or $stop == $last_stop ) {
# next;
# }
push( @via_show, $stop );
}
}
) # THIS STRIPS AWAY THE PARAMETERS THAT ARE NOT CONTAINED IN @pars_tocheck.
{
unless ( $elt ~~ @{ $pars_tocheck[$countcase] } )
{
delete ${ $tempvarnumbers[$countcase] }{$elt};
}
}
eq "")
{
my $elmo = $elem;
$elmo =~ s/(.*)-(.*)/$1/;
if ($elmo ~~ @integralslice)
{
;
}
else
{
if ($countblk
ert,[ $ident ]) >>
This clones the given certificate.
An ident as the key into the cache can be given (like C<host:port>), if not it
will be created from the properties of the original certificate.
I
xis pointing "northwest".
The default value is 0 (no rotation).
=item 'full' => color_spec
If given (no default), draw the full ellipse (not just the arc)
in this color, with a dot at its center.
c',
'and' => 'logic',
'//' => 'logic',
'&' => 'bitwise',
'|' => 'bitwise',
'~~' => 'match',
);
sub cmp_ok($$$;$@) {
my ($got, $op, $exp, $name, @diag) = @_;
my $ctx = c
m =~ (str)
=item &&
=item ||
=item xor
=item or
=item and
=item //
=item &
=item |
=item ~~
=back
=back
=head1 SOURCE
The source code repository for Test2-Suite can be found at
F<https:/
in = {@filter};
my $class = ref $self || $self;
for my $field (keys %{$in}) {
next if $field ~~ KEYWORDS;
for (split ' OR ', $field) {
return warn "OBJECT|ALERT: Unknown attribute: $obj