Are you aware of the %% operator?
$var %% 2 checks wether it is dividable by 2.
Am 30.04.2018 um 08:47 schrieb ToddAndMargo:
Hi All,
I know it would only take me 25 seconds to write one,
but do we have an odd and even function build in?
Many thanks,
-T
$ perl6 -e 'my $x=3; say $x.odd;'
No
I've changed the code to this, It's better but still not correct.
1) curl with http hangs and must be terminated with Ctrl+C
2) the code now restarts the server socket, which I also dont expect to
happen.
use v6;
use IO::Socket::Async::SSL;
sub auto-restart(Supply $incoming) {
supply {
Hi there,
I need your help. I've been playing around with the code example from
IO::Socket::Async::SSL and I am to stupid to get a propper error
handling to work.
use v6;
use IO::Socket::Async::SSL;
react {
my %ssl-config =
certificate-file => 'cert.pem',
private-key-fil
See I'm using mi6 to generate my META6.json file from the report and
it picks the version up from the module file. Other options like that
seem sensible to me.
Simon
On Wed, 28 Jun 2017, 13:01 Martin Barth, <mailto:mar...@senfdax.de>> wrote:
Hello,
but your approach mean
Hi there,
Assuming those two files A.pm and B.pm.
The file A.pm contains a class A and a role R with a private-method and
a $!private member. (the files are in the end of the e-mail)
1) I am wondering why a role can all its private methods:
> perl6 -I. -e 'use A; use B; my $b = B.new; $b.pu
ion of my module withouth having this
suffix in it?
Am 28.06.2017 um 14:16 schrieb Simon Proctor:
See I'm using mi6 to generate my META6.json file from the report and
it picks the version up from the module file. Other options like that
seem sensible to me.
Simon
On Wed, 28 Jun 201
mytest.pm6
use v6;
unit module mytest:ver<0.0.1>;
sub myver is export
{
mytest.^ver;
}
File mytest.p6
#!/usr/bin/env perl6
use lib '.';
use mytest;
say myver;
Console output:
$./mytest.p6
v0.0.1
I this what you meant?
On Tue, Jun 27, 2017 at 10:37 PM, Martin B
Hello everyone,
I wanted to repeat the question that I asked today on #perl6.
I am looking for a way to retrieve the version of a Perl6-Module from
within the module itself.
there is often a our $VERSION in perl5 modules. is this still
idiomatic/a good way to go in perl6
i think the version
Hi There,
I am not sure if my RoleType @array; is correct, or if there is a better
way to declare such an array. But I find the error that is happening
when there are no elements in the array confusing on the first sight. It
took me a while to realize that my array was empty and therefore it