Hi Will,

It is the MongoDB distribution in the file t/Test-support.pm6. It starts with;

use v6.c;

use MongoDB::Client;
use MongoDB::Collection;
use MongoDB::Server::Control;

and throws an error at line 119;

119:  method get-connection ( Int :$server = 1 --> MongoDB::Client ) {
        $server = 1 unless $server ~~ any $!server-range;
        my Int $port-number = $!server-control.get-port-number("s$server");
MongoDB::Client.new(:uri("mongodb://localhost:$port-number"));
      }


Changing the top into;

use v6.c;

use MongoDB::Collection;
use MongoDB::Server::Control;
use MongoDB::Client;

clears the error. There are many modules involved so it is difficult to golf it to a simpler form. The code can be found at https://github.com/MARTIMM/mongo-perl6-driver. You have to look into the 'develop' branch for the files. The problem file(Test-support) is in the attachment together with the 3 modules and the test file using the Test-support.

Regards,
Marcel

Attachment: Test-support.pm6
Description: application/pagemaker

Attachment: Client.pm6
Description: application/pagemaker

Attachment: Collection.pm6
Description: application/pagemaker

Attachment: Control.pm6
Description: application/pagemaker

Attachment: 110-Client.t
Description: Perl program

Reply via email to