DERIV_CD FOOD_DES NUT_DATA WEIGHT/;
}
sub get_columns_for {
my ( $self, $table ) = @_;
given ( $table ) {
when ( /^FOOD_DES$/i ) {
return [
qw/NDB_No FdGr
);
return;
}
method _init_from_api($activity) {
foreach my $key (keys %{ $activity }) {
given ( $key ) {
when ("athlete") { $self->_instantiate("Athlete", $key, $activity
= $self->auth->get_api("/segments/$self->{id}");
foreach my $key (keys %{ $segment }) {
given ( $key ) {
when ("athlete") { $self->_instantiate("Athlete", $key, $segment->{$key})
$athlete = $self->auth->get_api("/athlete");
}
foreach my $key (keys %{ $athlete }) {
given ( $key ) {
when (/bikes/) { $self->_instantiate("Athlete::Gear::Bike", $key, $athlet
return;
}
}
for my $given ( keys %args ) {
if (!first { $_ eq $given }
@{ $vali
=item IO ~~ :X
X<:r>X<:w>X<:x>X<:o>X<:R>X<:W>X<:X>X<:O>X<:e>X<:z>X<:f>X<:d>X<:l>X<:p>
X<:S>X<:b>X<:c>X<:t>X<:u>X<:g>X<:k>X<:T>X<:B>X<:M>X<:A>X<:C>
=item EXPR ~~ :X
$file.:X
$file ~~ :X
A file
ero size.
Likewise, just call C<.s> directly if you actually want to know the file's
size, since C<~~ :s> only returns a boolean.
The C<.T> and C<.B> methods will be replaced by some filetype guessin
fective uid to something else.
You can test multiple features using junctions:
if $filename.IO ~~ :r & :w & :x {...}
=back
=head2 IO::ACL
This is a basic abstraction; for better control, use t
the arguments:
for @kv <-> $key, $value {
$key ~= ".jpg";
$value *= 2 if $key ~~ :e;
}
=head2 Stub declarations
To predeclare a subroutine without actually defining it, use
push @a, "foo";
push @a, \(1,2,3);
push @a, "bar";
...
my ($i, $j, $k);
@a ~~ rx/
<,> # match initial elem boundary
:(Int $i,Int
**
non cmp <=> .. ILLEGAL cmp
chain == eq ~~ ($a op $b) and ($b op $c) eqv
list | & ^ Z op($a; $b; $c)
2 { ... }
when want.List { ... }
The C<want> function can be used with smart matching:
if want ~~ List & 2 & Lvalue { ... }
Which means it can also be used in a switch:
given want {
when Li
ctation count is C<Inf>. You shouldn't
actually return an infinite list, however, unless C<< want ~~ Lazy >>.
The opposite of C<Lazy> context is C<Eager> context (the Perl 5 list
context, which alway
ve where => Parametric, value => (1,2,3);
leave Loop, label => 'LINE', $retval;
leave { $_ ~~ Block and $_ !~ Sub } 1,2,3;
leave () <== 1,2,3;
As it currently stands, the parens aren't op
rn ; # ignored
},
# trigger is called if value is defined / given (independent if validated)
settrigger => sub {
my ( $value, $name, $v
less $self->{add_require}{$_}++;
}
}
=item $extractor->add_bin ($name[, $name...])
Adds the given (perl) program(s) to the file set, that is, a program
installed by some perl module, written in p
rl_code})) {
$self->add_plugins('SynopsisTests');
}
# Choose release plugin
given ($args{release}) {
when (lc eq 'real') {
$self->add_plugins('UploadToCPAN')
his must be after 'NextRelease' so that
# the Changes file is updated before committing.
given (lc $args{vcs}) {
when ('none') {
# No-op
}
when ('git') {
le</h2>\n};
}
$output .= $self->_format($var);
}
sub _format {
my($self, $var) = @_;
given (ref $var) {
when ('SCALAR') { return $self->_format_scalar($var); }
when ('ARRAY') { retur
ional string; the template is loaded on object creation if
given.
Single delimiter pairs can be given (default delimiters shown), but they have
to be array references with exactly 2 strings; the deli
, type => $type)
Add a recipient to a text. $type can be one of "recpt", "cc" or "bcc".
If not given (or if set to something other than one of those three
strings) it defaults to "recpt". C<text_no>
_node ( keys %{ $graph{$last_node} } ) {
# print "\n link node : $link_node";
if ( $link_node ~~ @temp_path ) {
}
else {
#msg( "\n link node $link_node not in @temp_path",$verbose);
es;
use Moose::Util::TypeConstraints;
subtype 'LabelFontWeight'
=> as 'Str'
=> where { $_ ~~ [qw(normal bold)] }
=> message { "$_ is not a valid LabelFontWeight ('bold', 'normal')" };
cl
t = $self->opposite_suit($self->diamond);
=cut
sub opposite_suit {
my ( $self, $suit ) = @_;
given ( $suit->name ) {
when ( $_ eq $self->spade->name ) { return $self->club; }
when ( $_ eq $s
ub = $self->next_suit($self->diamond);
=cut
sub next_suit {
my ( $self, $suit ) = @_;
given ( $suit->name ) {
when ( $_ eq $self->club->name ) { return $self->heart; }
when ( $_ eq $
= $self->previous_suit($self->spade);
=cut
sub previous_suit {
my ( $self, $suit ) = @_;
given ( $suit->name ) {
when ( $_ eq $self->club->name ) { return $self->diamond; }
when ( $_ eq
next card in the BCS system.
=cut
sub calc_suit {
my ( $self, $prev_card, $new_value ) = @_;
given ( $new_value->value ) {
when ( [ 1, 2, 3 ] ) { return $prev_card->suit; }
when ( [ 4, 5, 6 ]
t = $self->opposite_suit($self->diamond);
=cut
sub opposite_suit {
my ( $self, $suit ) = @_;
given ( $suit->name ) {
when ( $_ eq $self->spade->name ) { return $self->club; }
when ( $_ eq $s
spade = $self->next_suit($self->diamond);
=cut
sub next_suit {
my ( $self, $suit ) = @_;
given ( $suit->name ) {
when ( $_ eq $self->spade->name ) { return $self->heart; }
when ( $_ eq $
= $self->previous_suit($self->spade);
=cut
sub previous_suit {
my ( $self, $suit ) = @_;
given ( $suit->name ) {
when ( $_ eq $self->spade->name ) { return $self->diamond; }
when ( $_ eq
on')->list) {
my @section_pages = $self->{c}->model('Section')->pages($section);
if ($page ~~ @section_pages) {
return $section;
}
}
return;
}
=head1 NAME
Perldoc::Server::Mode