Hi All,
I am trying to use the C extention feature with perl6. Although it worked
fine with perl5, the C extention is different from perl5 to perl6. I tried
to use the same as following :
h2xs -PAXn Math::Simple
ashiva@ubuntu:~/Parrot/rakudo/Inline-0.44/Math-Simple$ cat math.pl
#!/usr/bin/perl6
use lib './lib/Math/.';
use Math::Simple;
print add(2, 3);
print subtract(3, 2);
ashiva@ubuntu:~/Parrot/rakudo/Inline-0.44/Math-Simple$
ashiva@ubuntu:~/Parrot/rakudo/Inline-0.44/Math-Simple$ cat
lib/Math/Simple.pm
package Math::Simple;
$VERSION = '1.23';
use base 'Exporter';
@EXPORT_OK = qw(add subtract);
use strict;
use Inline C => 'DATA',
VERSION => '1.23',
NAME => 'Math::Simple';
1;
__DATA__
=pod
=cut
__C__
int add(int x, int y) {
return x + y;
}
int subtract(int x, int y) {
return x - y;
}
But I keep getting this error :
ashiva@ubuntu:~/Parrot/rakudo/Inline-0.44/Math-Simple$ perl6 math.pl
===SORRY!===
arglist case of use not yet implemented. Sorry.
at math.pl:3
ashiva@ubuntu:~/Parrot/rakudo/Inline-0.44/Math-Simple$
Does anyone know anything about it ?
Please reply.
Thanks & Regards,*
Ashraya S Shiva*