Have you considered hash flattening into argument lists yet?
method new(Int $a) {
my %args;
with $a { %args<$a> = $a }
self.bless(|%args);
}
Does that help you forward at all?
- Timo
Suppose I have a class with a default attribute
class Foo { has Int $.a = 1; }
Now I want to write a custom constructor for it, with either `Foo.new()` or
`Foo.new(3)` doing the obvious thing. Here's one way to do it:
multi method new(Int $a = 1) { self.new(:$a); }
but this duplicates t
Another way to produce such this issue:
perl6 -e "say 'ip'.IO.lines.hyper.map(* ~~ /<{ (1...255).list }> '.'/).all.so"
Incompatible MROs in P6opaque rebless
in any mixin at src/gen/m-Metamodel.nqp:1273
in whatevercode at -e:1
Incompatible MROs in P6opaque rebless
in any mixin at src/gen/m-
Another way to produce such this issue:
perl6 -e "say 'ip'.IO.lines.hyper.map(* ~~ /<{ (1...255).list }> '.'/).all.so"
Incompatible MROs in P6opaque rebless
in any mixin at src/gen/m-Metamodel.nqp:1273
in whatevercode at -e:1
Incompatible MROs in P6opaque rebless
in any mixin at src/gen/m-
# New Ticket Created by
# Please include the string: [perl #125973]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=125973 >
How to reproduce:
perl6 -e "'t' ~~ /<{'a'...'z'}>/"
Current result:
This Seq has already b
# New Ticket Created by
# Please include the string: [perl #125987]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=125987 >
13:46 cdc m: react { whenever supply { for "/etc/os-release".IO.lines {
emit $_ }; done } { .s
# New Ticket Created by dakkar
# Please include the string: [perl #125975]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=125975 >
Consider this snippet:
constant NOW = DateTime.now;
That is a BEGIN-time declaration + init
Branch: refs/heads/master
Home: https://github.com/perl6/specs
Commit: a71e3792116c9705b94c5a0879fa01e54e9b4f1d
https://github.com/perl6/specs/commit/a71e3792116c9705b94c5a0879fa01e54e9b4f1d
Author: skids
Date: 2015-09-04 (Fri, 04 Sep 2015)
Changed paths:
M S99-glossary
# New Ticket Created by
# Please include the string: [perl #125978]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=125978 >
* How to reproduce (where ip is the attached file):
perl6 -e "say 'ip'.IO.lines.hyper.map(* ~~ /
# New Ticket Created by
# Please include the string: [perl #125974]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=125974 >
How to reproduce:
time perl6 -e "say 'abcdef' ~~ /<{('a' ... 'z').list}>+/"
「abcdef」
Curren
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #125988]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=125988 >
m: sub foo( Str &b:(Bool --> Int) ) { say "alive" };
foo( sub (Bool) { 42 } )
rakudo-mo
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #125985]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=125985 >
hey, #perl6, I wrote this:
https://gist.github.com/masak/b84a87a694217c9508d6
constant
12 matches
Mail list logo