1. Should there be a way to make "die" behave like the Perl 5 version,
reporting the place of death unless the message is terminated by \n ?
The \n no longer suppresses the location indormation. I can't find a
definition either way in the Synopses.
2. The following code (c_to_f) is broken: (I subsequently found the
correct way to loop over the 0..20 values)
#! /home/guru/bin/perl6
my $c;
for $c = 0..20 {
say $c;
my $f = ($c * 9 / 5) +32;
say $f;
}
It produces the following result:
$ ./c_to_f
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
69.8
"Say" is clearly treating $c as an array in some way, but the arithmetic
is using a value of 21 (the number of array elements) in $c. Is there a
reasonable explanation for what's happening?
3. The following is an edited transcript of a session playing with ...
(the comment lines inserted afterwards). Are they the intended results?
$ perl6 -e 'say "Yo"; {...} ; say "Bye" '
Yo
# Unannounced demise
$ perl6 -e 'say "Yo"; {???} ; say "Bye" '
Yo
Stub code executed in <anon> at line 1
Null PMC access in setprop()
in main program body at line 1
# Is this message correct?
$ perl6 -e 'say "Yo"; {!!!} ; say "Bye" '
Yo
Stub code executed
in main program body at line 1
# Reasonable, according to the synopsis
$ perl6 -e 'say "Yo"; { } ; say "Bye" '
Yo
Bye
# Again, reasonable beaviour
$ perl6 -e 'say "Yo"; if !{...} { say "Bye"} '
Yo
$ perl6 -e 'say "Yo"; if {...} { say "Bye"} '
Yo
Bye
# The opposite to what I'd expect, if ... returns failure
$ perl6 -e 'say "Yo"; say {...} '
Yo
_block1063
# What is that? The reference to an anonymous subroutine?
$ perl6 -e 'say "Yo"; if {...} { }; say "Bye" '
Yo
Bye
# Reasonable
I would have submitted this through my usual account at GMail, but GMail
says it "has detected unusual activity on my account", and wants to send
me a confirmation code on a cellphone.
A) I don't own a cellphone, and
B) wouldn't give Google the number if I did.