range of actions, each of
which is specified by keying a unique letter, like so:
INPUT:
given (prompt '[S]ave, (R)evert, or (D)iscard:', -default=>'S') {
when (/R/i) { revert_file()
{ goto INPUT; }
}
This can be cleaned up (very slightly) by using a guarantee:
given (prompt '[S]ave, (R)evert, or (D)iscard:', -default=>'S',
-guarantee=>qr/[SRD]/
Prompter provides an option that extracts this
information directly from the prompt itself:
given (prompt '[S]ave, (R)evert, or (D)iscard:', -keyletters) {
when (/R/i) { revert_file() }
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_
@_;
return match { return $_ ~~ $match for $sub->() };
}
sub any {
my @possibilities = @_;
return match {
for my $candidate (@possibilities) {
return 1 if $_ ~~ $candidate;
}
return;
};
rn match { scalar hash and [ sort keys %{$_} ] ~~ [ sort keys %{$hash} ] };
}
sub value {
my $value = shift;
return $value if blessed($value);
given (ref $value) {
when ('') {
return $value;
NAME
Smart::Match - Smart matching utilities
=head1 VERSION
version 0.008
=head1 SYNOPSIS
given ($foo) {
say "We've got a positive number" when positive;
say "We've got an array" when
gzFile fp() { return m_fp; }
private:
gzFile m_fp;
};
/*
* Binary read the given (array of) object(s) from the compressed file.
* If the input file was not in gzip format, read(
}
private:
gzFile m_fp;
ostrstream* m_os;
};
/*
* Binary write the given (array of) object(s) into the compressed file.
* returns the number of uncompressed bytes actual
ive> might also be added depending on the status of the
C<keep_alive> attribute.
If $content is given (and it is non-empty), then a C<Content-Length>
header is automatically added unless it was alrea
s
defines what to do (or not do) given the digit of the beat-string.
For C<0>, we rest - for the given (or default) duration. For C<1>, we
add a note to the score.
This "vary" option can be made up o
all
patterns to appear in a line (in no particular order). Normally, when multiple
patterns are given (via multiple `-e` or `--regexp` options), grep will include
lines that just contain at least one
all
patterns to appear in a line (in no particular order). Normally, when multiple
patterns are given (via multiple C<-e> or C<--regexp> options), grep will include
lines that just contain at least o
->{pt}->add_string($key, $exclude ? '!'.$key : $key)
} or warn "netset: illegal IP address given (patricia trie): ".
"'$key': $@\n";
}
$cidr .= '/' . $masklen if define
.
Thus if I<where> is B<se> then the lower-right corner of
I<$slave>'s border will appear at the given (x,y) location
in the master.
The anchor position defaults to B<nw>.
=item B<width> => I<size>
unter
size down to 32 bits, allowing only up to 256 GB of data to be safely
encrypted with a given (key, nonce) pair.
These primitives should only be used to implement protocols that specifically
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,
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.
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
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) {
acket had an empty ANSWER
* section
* \param[out] match On match, the given (reference to a) pointer will be set
* to point to the matching nsec resource
the soa serial to the number of
* seconds since unix epoch (1-1-1970 00:00).
* When data is given (i.e. the function is called via
* ldns_rr_soa_increment_func_int), it is used as the current ti
serial to the current date
* succeeded by a two digit iteration (datecounter).
* When data is given (i.e. the function is called via
* ldns_rr_soa_increment_func_int), it is used as the current ti
be marked and should specifically
* be taken into account separately.
*
* When glue_list is given (not NULL), in the process of marking the names, all
* glue resource records will be pushed to t
te_at(buffer, buffer->_position, data, count);
buffer->_position += count;
}
/**
* copies the given (null-delimited) string to the specified position at the buffer
* \param[in] buffer the buffer
at, const char *str)
{
ldns_buffer_write_at(buffer, at, str, strlen(str));
}
/**
* copies the given (null-delimited) string to the current position at the buffer
* \param[in] buffer the buffer
*
r *buffer, const char *str)
{
ldns_buffer_write(buffer, str, strlen(str));
}
/**
* copies the given (null-delimited) string to the current position at the buffer
* increasing the capacity if neces
fetch( $page->image_links->[0] );
},
sub {
given ( $_[0] ) {
when ('connection_failed') {
return fetch
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