There are many ways to have fun with Perl + Inline::C. I chose to separate the Perl and C source files. In fact, created Sandboxing with Perl + MCE + Inline::C some time back. The algorithm3.pl script works out of the box. The other two scripts require dependencies mentioned in the README file.
./bin/ algorithm3.pl primesieve.pl primeutil.pl ./src algorithm3.c bits.h output.h sandbox.h sprintull.h typemap
The following is the Inline::C bits inside algorithm3.pl. I chose to hide the .Inline directory under the base dir.
BEGIN { $ENV{PERL_INLINE_DIRECTORY} = "${base_dir}/.Inline"; mkdir "${base_dir}/.Inline" unless -d "${base_dir}/.Inline"; } use Inline 'C' => Config => CCFLAGSEX => "-I${base_dir}/src -O2 -fsigned-char -fomit-frame-poin +ter", TYPEMAPS => "${base_dir}/src/typemap"; use Inline 'C' => "${base_dir}/src/algorithm3.c";
Well, this may not be a perfect solution. I am still learning Inline::C.
In reply to Re: About Moo and Inline::C
by marioroy
in thread About Moo and Inline::C
by karlgoethebier
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |