You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone! I am interested in mixing compiled RPerl code with regular perl scripts (as a replacement for writing an XS module). I have this simple test RPerl module:
# [[[ HEADER ]]]
use RPerl;
package MyModule;
use strict;
use warnings;
our $VERSION = 0.001_000;
# [[[ CRITICS ]]]
## no critic qw(ProhibitUselessNoCritic ProhibitMagicNumbers RequireCheckedSyscalls) # USER DEFAULT 1: allow numeric values & print operator
# [[[ SUBROUTINES ]]]
sub foo {
{ my void $RETURN_TYPE };
print "MyModule: foo()\n";
return;
}
I can compile this into c++ (MyModule.cpp) using rperl MyModule.pm.
Then, I have a regular Perl script p.pl (not RPerl) where I would like to use the compiled RPerl module:
#! /usr/bin/env perl
use strict;
use warnings;
use lib '.';
# use MyModule; # <-- How to include the compiled RPerl module??
print "main: starting..\n";
MyModule::foo();
print "main: finished..\n";
How can I include the compiled RPerl module here?
Thanks!
The text was updated successfully, but these errors were encountered:
Hello everyone! I am interested in mixing compiled RPerl code with regular perl scripts (as a replacement for writing an XS module). I have this simple test RPerl module:
I can compile this into c++ (
MyModule.cpp
) usingrperl MyModule.pm
.Then, I have a regular Perl script
p.pl
(not RPerl) where I would like to use the compiled RPerl module:How can I include the compiled RPerl module here?
Thanks!
The text was updated successfully, but these errors were encountered: