# New Ticket Created by Lithos
# Please include the string: [perl #77200]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=77200 >
Hi!
I tried using C<new> as an in-place mutator as mentioned in S12,
but it does not seem to work.
Also the error message says "in main program body at line 1",
which does not make sense.
The line with $good in the test program below works.
The line with $bad in the test program below causes the error
too few positional arguments: 1 passed, 2 (or more) expected
in main program body at line 1
If the line with $bad is commented out, the line with $bad2 causes
too few positional arguments: 2 passed, 3 (or more) expected
in main program body at line 1
Lithos
This is Rakudo Perl 6, version 2010.07-113-gc41bcd7 built on parrot 2.6.0 r48341
$ cat test.pl
use v6;
my class Dog {
}
my Dog $good = Dog.new;
my Dog $bad .= new;
my Dog $bad2 .= new(1);
$ ./perl6 test.pl
too few positional arguments: 1 passed, 2 (or more) expected
in main program body at line 1
$