# New Ticket Created by "brian d foy"
# Please include the string: [perl #131408]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=131408 >
I have this program:
#!/Applications/Rakudo/bin/perl6
use Test;
bail-out();
When I run it, it complains about too many parameters:
$ prove -e 'perl6 -Ilib' t/bail.t
t/bail.t .. Any
Too many positionals passed; expected 1 argument but got 2
in sub bail-out at
/Applications/Rakudo/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E
(Test) line 258
in block <unit> at t/bail.t line 4
t/bail.t .. Dubious, test returned 1 (wstat 256, 0x100)
No subtests run
Test Summary Report
-------------------
t/bail.t (Wstat: 256 Tests: 0 Failed: 0)
Non-zero exit status: 1
Parse errors: No plan found in TAP output
Files=1, Tests=0, 2 wallclock secs ( 0.03 usr 0.01 sys + 2.14
cusr 0.16 csys = 2.34 CPU)
Result: FAIL
This is the section causing the problem:
256 sub bail-out ($desc?) is export {
257 $output.put: join ' ', 'Bail out!', ( $desc ?? $desc !! '' );
258 $done_testing_has_been_run = 1;
259 exit 255;
260 }
I made several changes to try to suss out the problem, but I couldn't
make the error go away without removing line 257. When I check "$output.^name",
I get "Any".
Running without `prove` shows the same problem:
$ perl6 t/bail.t
Too many positionals passed; expected 1 argument but got 2
in sub bail-out at
/Applications/Rakudo/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E
(Test) line 257
in block <unit> at t/bail.t line 4
Running it in https://glot.io/new/perl6 shows the same thing.
Besides the actual error, the error message isn't great. I would have
liked it to mention the method name and class causing the problem.
This is:
$ perl6 -v
This is Rakudo version 2017.04.3 built on MoarVM version 2017.04-53-g66c6dda
implementing Perl 6.c.