sep, ",", "Sep = ,");
for < , ; > -> $sep {
my Str $data = "bAr,foo\n1,2\n3,4,5\n";
$data ~~ s:g{ "," } = $sep;
$csv.column-names (False);
{ my $fh = IO::String.new: $data;
ok (my
,", ";" ];
for ",", ";", "|", "\t" -> $sep {
my Str $data = "bAr,foo\n1,2\n3,4,5\n";
$data ~~ s:g{ "," } = $sep;
$csv.column-names (False);
{ my $fh = IO::String.new: $data;
ok (my
>], "Headers");
}
for < , ; > -> $sep {
my Str $data = "bAr,foo\n1,2\n3,4,5\n";
$data ~~ s:g{ "," } = $sep;
$csv.column-names (False);
{ my $fh = IO::String.new: $data;
ok (my
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
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;
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;
{
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) {
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 );
}
}
empfoo;
my $start = [gettimeofday];
while ($mux->handles < $opt{conc} && new_conn()) {
##warn ~~ $mux->handles();
die if $mux->handles > $opt{conc};
}
$mux->loop;
my $howlong = tv_interval($
if ($expect.defined && $expect ~~ m/ "\r\n" /) {
my $r = $expect;
my $n = $expect;
$n ~~ s:g{ "\r\n" } = "\n";
);
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
"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")
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,
n ISO8601
return $dow; # return Mon=1 as in ISO8601
}
# return month days count for given ( year, month ) (not strictly julian_ namespace)
sub julian_date_month_days_ym
{
my $y = shift;
ponse will
be based on the request, but can be added or overridden using \%HEADER.
If MSG is not given (e.g. argument is missing, second argument is \%HEADER
already) a builtin message for the code wi
turns the Greenwich hour angle of the mean equinox at
0 hours universal on the day whose time is given (i.e. the argument is
a standard Perl time).
=cut
sub theta0 {
my ($time) = @_;
my @t =
- alias for domain2proxy
# Returns: $self
# Comment:
# FIXME
# If more than one leg is given (e.g. legs+outgoing_proxy) than you have
# to provide a function to find out, which leg is used t
l has access to @val if required)
}
# evaluate advanced formatting expression if given (eg. "${TAG;EXPR}")
if (defined $expr and defined $val) {
local $SIG{'__WARN_