in reply to Setting the build directory for a module using Inline::C
You need to move your use JavaScript::Duktape line outside of the BEGIN block, then it should work:
BEGIN { #mkdir '/tmp/pagecamel_helpers_javascript_inline'; $ENV{PERL_INLINE_DIRECTORY} = '/tmp/pagecamel_helpers_javascript_i +nline'; }; use JavaScript::Duktape;
The BEGIN { ... } block is first parsed, and during parsing, all use statements are executed when encountering them. This still executes the loading of the module too early for your directory to work.
Ideally, JavaScript::Duktape would move away from using Inline::C and instead distribute and use the XS file created by Inline::C, but that's something for a different time.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Setting the build directory for a module using Inline::C
by cavac (Prior) on Apr 04, 2022 at 13:38 UTC | |
by syphilis (Archbishop) on Apr 04, 2022 at 23:02 UTC |