You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically, any argument containing only whitespace seems to trigger
this error. It seems that the presence of the MAIN sub is part of the
error; remove it and it accepts all of the inputs causing an error
below.
$ cat x.pl
sub MAIN {}
$ perl6 x.pl -y=' '
Cannot invoke this object
in block <unit> at x.pl:1
$ perl6 x.pl -y=''
Cannot invoke this object
in block <unit> at x.pl:1
$ perl6 x.pl -y=`perl -E'say "\n"'`
Cannot invoke this object
in block <unit> at x.pl:1
$ perl6 x.pl -y=`perl -E'say "\t"'`
Cannot invoke this object
in block <unit> at x.pl:1
$ perl6 x.pl -y=`perl -E'say "\t "'`
Cannot invoke this object
in block <unit> at x.pl:1
$ perl6 --version
This is perl6 version 2015.10-89-g36c4c6a built on MoarVM version
2015.10-14-g5ff3001
The examples would fail usage constraints with the parameterless MAIN.
I could not get them to fail with any internal messages on current rakudo,
either with the parameterless MAIN or with a MAIN that had a :$y.
Haven't looked as to when this got fixed.
Tests added for both cases (though I had to add a sub USAGE when testing
the parameterless case) in Raku/roast@bdf67b698b,
so closing as resolved.
Migrated from rt.perl.org#126532 (status was 'resolved')
Searchable as RT126532$
The text was updated successfully, but these errors were encountered: