The trouble I get at the moment is an error generared by the following piece of code

      return MongoDB::Cursor.new(
        collection      => self,
        OP_REPLY        => $OP_REPLY,
        criteria        => %@criteria
      );

It generates the error;

Default constructor for 'MongoDB::Cursor' only takes named arguments
in method throw at /home/marcel/Software/lib/perl6/share/perl6/runtime/CORE.setting.moarvm:1
...

In the previous mails I've tried to golf it but failed, so there is something in my programs which triggers this error but I don't know where and why.

I could solve it by using other named parameter formats but the following code rewrite (which now doesn't error) seems to point to the combination with the return statement;

      my $c = MongoDB::Cursor.new(
        collection      => self,
        OP_REPLY        => $OP_REPLY,
        criteria        => %@criteria
      );

      return $c;

perl6 version 2015.09-162-gdd6c855 built on MoarVM version 2015.09-39-g1434283

Greetings
Marcel Timmerman

Reply via email to