my ( $self, $id, $value ) = @_;
my $pos = $self->{row}->{pos};
my $row;
#if ($id ~~ @{$self->{rocols}}){
$self->{log}
->debug( "set_field: rocols: " . join( " ", @{ $self->
elf->{fieldsRel}->{$id};
$rel = ( $rel ? $rel : "" );
my $key = $rel . $id;
#if ($key ~~ @{$self->{rocols}}){
if ( grep( /^$key$/, @{ $self->{rocols} } ) ) {
$self->{log}->deb
estbinsubdir);
# remove pod2html cache files; 5.6 uses ".x~~" and 5.8 uses ".tmp" extensions
unlink("pod2htmd.$_", "pod2htmi.$_") for qw(x~~ tmp);
# copy all GIF files from docs directy to html tree
to_save) {
#my $name = $field->{name};
# if ( $field->{name} ~~ @{$self->{cols}})
if ( defined $self->{hcols}->{$name} ) {
=> "feature",
};
} elsif(!(@{$features{$id}{transcript_ids}} ~~ $trans_id)) {
push(@{$features{$id}{transcript_ids}},$trans_id);
}
if(!define
{
$self->{log}->debug( "Processing field " . $fieldname );
#if ( $sql_fieldname ~~ @pk) {
if ( grep ( /\b$fieldname\b/, @pk ) ) {
my @keys = keys %new_values;
e=$tmp",
"--outfile=$htm",
);
# remove pod2html cache files; 5.6 uses ".x~~" and 5.8 uses ".tmp" extensions
unlink("pod2htmd.$_", "pod2htmi.$_") for qw(x~~ tmp);
BuildTools::rm_f($tmp);
exit(0);
trol>, I<shift> and I<alt>.
Several prefixes may be combined, but must appear in the order just given
(so for example B<S_C_A> would be illegal).
=back
Alternatively, key specifications may also fo
return unless $value;
$name = $params{index}.'. '.$name
if $params{index};
given (ref $value) {
when('') {
$table->row($name,$value);
}
when('
-else Structure
the next 2 program sequences will do the same thing: will read the input and
given( <STDIN> ) {
when ( 'virus' ) { say 'the whole file is virus' }
when ( /\Avirs/ ) { say 'the
will be $_ ~~ (...)
my $_ = <STDIN>;
if ( $_ ~~ 'Fred' ) { say 'the whole file is virus' }
elsif ( $_ ~~ /\Avirus/ ) { say 'the file name starts with a virus' }
elsif ( $_ ~~ /virus/ )
se { say "this file is clean" }
On the other hand, if we write this way
given( <STDIN> ) {
when ( /virus/ ) { say 'the file is corrupt'; continue }
when ( 'virus' ) { say
############
# SYNOPSIS Screen Output
# 01: <?xml version="1.0"?><Styles><Style ss:ID="Default"/ ~~ / ss:ID="s22"><Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="14" ss:Color="#000000"
######
x but does <=> leg cmp .. ..^ ^.. ^..^
C Chaining infix != == < <= > >= eq ne lt le gt ge ~~ === eqv !eqv
X Tight and &&
X Tight or || ^^ // min max
R Conditio
ns:
$target ~~ MyType S& *.mytest1 S& *.mytest2
This is useful when later tests might throw exceptions if earlier
tests don't pass. This cannot be guaranteed by:
$target ~~ MyType & *.myte
sifiable than the right:
$target ~~ *.mycheaptest S| *.myexpensivetest
This is also useful when you want to perform tests in order
of safety:
$target ~~ MyType S| *.mysafetest S| *.mydanger
ef; sometimes its a list of DCAT objects, sometimes a listref of strings
unless (ref($values) ~~ /ARRAY/){ # some properties return listrefs, others return just a string or an object
$values
print STDERR $object, "\n";
next unless ($object); # might be undef
if ((ref($object) ~~ /FAIR/) && $object->can('_toTriples')) { # is it a FAIR object? if so, unpack it
my $toConn
use Test2::Plugin::UTF8;
use Test::Log::Shiras;
plan( 3 );
~~ Set up the Log::Shiras::Switchboard operator here ($ella_peterson) ~~
my $test_class;
ok( lives{ $test_class = Log::Shiras::Test2
wp_response_done__check_md5 ($r2l, $resp);
}
# if ($uri->scheme eq 'file' && $uri->host ~~ ['','localhost']) {
# my $filename = $uri->file;
# require Digest::file;
#
l qw< blessed >;
use overload (); no warnings 'overload'; # '~~' unavailable in Perl 5.8
use overload
'""' => 'to_string',
'~~' => 'check',
'==' => 'check',
'eq' => 'check',
le >>
=item C<< FileName >>
=item C<< FileUri >>
=back
They can be used like this:
if ($file ~~ FileHandle)
{
...
}
Note that there does exist a L<FileHandle> package in Perl core. This
mod
=> q[bool],
STRING => q[""],
NUMBER => q[0+],
REGEXP => q[qr],
SMARTMATCH => q[~~],
map {; $_ => $_ } qw(
SCALAR ARRAY HASH CODE REF GLOB
LVALUE FORMAT IO VSTRING
)
);
) >>
Called with a single argument, tests C<< $_ >>. Yes, this works with lexical
C<< $_ >>.
given ($object) {
when(does ARRAY) { ... }
when(does HASH) { ... }
}
Note: in Scalar::D
d value. For ex:
$elem->SetAttributeId("", 3, $value) ~~ $elem->SetAttribute("3", $value)
$elem->SetAttributeId("INSERTITEM", 8, $value) ~~ $elem->SetAttribute("INSERTITEM8", $value)
But these f
. For ex:
$elem->SetAttributeId("KIND", 30, $value) ~~ $elem->SetAttribute("KIND30", $value);
$elem->SetAttributeId("ADDLEAF", 10, $value) ~~ $elem->SetAttribute("ADDLEAF10", $value);
But these
->has_fields ? zip $self->fields->@*, @_ : ()
};
$r;
}
},
'~~' => sub {
my( $self, $other ) = @_;
no warnings 'uninitialized';
return $
f ' }
# smart-matching compare the type between two actions
print "matching" if $do_stuff ~~ $AddTodo->(); # prints 'matching'
=head1 AUTHOR
Yanick Champoux <yanick@cpan.org>
=head1 COPYRI