I expected this wouldn't work because the attribute definition is parsed at
compile time when $!x and $!y aren't known. The error is definitely LTA.
You can do what you want like this:
class rect {
has $.x;
has $.y;
has Array $.area .= new(:shape($!x,$!y))
}
say rect.new(x => 3,y =>
On 02/19/2017 11:15 PM, ToddAndMargo wrote:
> On 02/19/2017 07:15 AM, Timo Paulssen wrote:
>> Oh, another question:
>>
>> please tell us how you reached that site? I expect you did a google
>> search or something; can you tell us what search terms you've used to
>> get there? We should obviously
I added the red box today after reading this thread! :)
S
On 19 February 2017 at 15:14, Timo Paulssen wrote:
> Can you suggest how to improve the warnings about its obsolescence? Right
> now it says:
>
> This file is part of the Perl 6 Archive
> Note: these documents may be
On 02/19/2017 07:15 AM, Timo Paulssen wrote:
Oh, another question:
please tell us how you reached that site? I expect you did a google
search or something; can you tell us what search terms you've used to
get there? We should obviously improve the docs so that they get found
instead of the
On Sun, Feb 19, 2017 at 10:14 AM, Timo Paulssen wrote:
> Can you suggest how to improve the warnings about its obsolescence? Right
> now it says:
They wanted to use a perl 5 to perl 6 converter. They were warned that all
such had not been maintained in some time and were
# New Ticket Created by Neven Luetic
# Please include the string: [perl #130817]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=130817 >
class rect {
has $.x;
has $.y;
has @.area[$!x;$!y];
}
my $rect = rect.new(x =>
# New Ticket Created by Wenzel Peppmeyer
# Please include the string: [perl #130816]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=130816 >
my $manna = :a1:b2:c3; dd $manna;
# OUTPUT: «Pair $manna = :a1»
# expected: warning
Oh, another question:
please tell us how you reached that site? I expect you did a google
search or something; can you tell us what search terms you've used to
get there? We should obviously improve the docs so that they get found
instead of the archive …
Can you suggest how to improve the warnings about its obsolescence?
Right now it says:
>
> This file is part of the Perl 6 Archive
>
> Note: these documents may be out of date. Do *not* use as reference!
>
> To see what is currently happening visit http://www.perl6.org/
>
And then a bit
Hi,
On 19/02/17 04:48, ToddAndMargo wrote:
>"die" is not all that useful, as it always exits
> with a "1". With "exit", you can set the exit code.
that's leaving out a whole lot of context, though. "die" is a quick way
to throw an exception. If an exception reaches the outermost part of
10 matches
Mail list logo