Hi all,

thanks to the wonderful Inline::Java module I recently published these bindings: http://search.cpan.org/perldoc?Net::RabbitMQ::Java

However I'm running into a problem. My Java library needs strings to be passed as byte arrays, so I'm using the following snippet:

    [ unpack("C*", $string) ]

that creates an arrayref of scalars holding single bytes. This is very inefficient but it seemed to work... until I tried to pass a string larger than ~156 bytes. It fails with the following error:

[perl][3] error trying to fit args to prototype: 195 out of range for type byte at /usr/local/lib/perl/5.10.1/Inline/Java/Array.pm line 543

What does this mean? Any workaround?

Also, would it be possible to add an automatic conversion from Perl scalars to Java byte arrays?

Thank you and keep up the good work!

    - alessandro.

Reply via email to