# New Ticket Created by Moritz Lenz # Please include the string: [perl #63590] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=63590 >
Rakudo 08b789048: ./perl6 -e 'class A { submethod BUILD(*...@a) { say @a.perl } }; A.new(x => 3)' Could not locate a method 'perl' to invoke on class 'A'. Now that's bad. BUILD shouldn't receive the initially created object, but the same arguments that .new received. Note that S12 has one example that's a bit confusing, but later it says Any named arguments to C<bless> are automatically passed to the C<CREATE> and C<BUILD> routines. This is tested in t/spec/S12-construction/named-params-in-BUILD.t (not yet in t/spectest.data) On a somewhat related note, defining the method as submethod BUILD { ... } (without explicit signature) results in the error "too many arguments passed (3) - 1 params expected" which implies that it didn't get the right default signature (*...@_ is rw, *%_ is rw) -- Moritz Lenz http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/