# New Ticket Created by  Gabriel Ash 
# Please include the string:  [perl #132088]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=132088 >


Hello,

I've written a module with release 2017-07. 

source here: https://github.com/gabrielash/perl6-zmq

It fails travis ci test with 'latest'  release, but passes with '2017-07'.

This is the error

./t/11.t ..... Too few positionals passed; expected 5 arguments but got 3

in method send at
/home/travis/build/gabrielash/perl6-zmq/lib/Net/ZMQ/Message.pm
(Net::ZMQ::Message) line 244

in block <unit> at ./t/11.t line 55

I am not sure what is wrong and whether it is a bug or my mistake.

I tried to isolate the problem with the following test, but that test,
in isolation, does work on the latest build. 

So there is something in the module interacting badly with this
nativecall, but only on the latest release.

class zmq_msg_t is repr('CStruct') {
    has int64 $._;
    has int64 $._1;
    has int64 $._2;
    has int64 $._3;
    has int64 $._4;
    has int64 $._5;
    has int64 $._6;
    has int64 $._7;
}

sub zmq_msg_init_data(zmq_msg_t
                                         ,Pointer
                                         ,size_t
                                         ,Pointer = nativecast( Pointer, 0)
                                         ,Pointer = nativecast( Pointer, 0)
                                  ) is native('zmq', v5)
                          returns int32 is export { * }

my buf8 $b .= new(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
my Pointer $p = nativecast(Pointer, $b);
my zmq_msg_t $m .= new ;

lives-ok {zmq_msg_init_data($m, $p , 10  )}, "native call ok ";

Hoping you can help.

Gabriel Ash

Reply via email to