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
I am adding a new Inline language (CUDA, heavily based on Inline::C) and in testing it it occured to me that I am not able to test whether configuration (i.e. use Inline C => Config => list)) or compilation (i.e. use Inline C => code) was successful.
The only way I can think of is to enclose Inline->bind() in a try/catch-or-eval block.
But it does not seem bind() is called at all. I read the caveats under bind() but could not understand them.
use Inline;
use Try::Tiny;
try {
Inline->bind(C => code, config);
} catch { die "failed: $_" }
although this seems to call bind():
use Inline;
Inline->bind(C => code, config);
but I risk diying unexpectedly ...
Of course I can create a temp testfile with the Inline code/config on the fly and run it from my main test file to see if it compiles. But that's cumbersome...
it is not an issue. I was kind of asking a question really. So unless you know the answer, there is no point to keep this open (If you were asking me whether it can be closed).
I am adding a new Inline language (CUDA, heavily based on Inline::C) and in testing it it occured to me that I am not able to test whether configuration (i.e.
use Inline C => Config => list)
) or compilation (i.e.use Inline C => code
) was successful.The only way I can think of is to enclose
Inline->bind()
in a try/catch-or-eval block.But it does not seem
bind()
is called at all. I read the caveats underbind()
but could not understand them.although this seems to call
bind()
:but I risk diying unexpectedly ...
Of course I can create a temp testfile with the Inline code/config on the fly and run it from my main test file to see if it compiles. But that's cumbersome...
10 min edit: Also see: https://perlmonks.org/?node_id=11159977 and the suggestion for require+import which works too
20 min edit: actually
bind()
is called inside try/catch and eval. Perhaps I had stale files in_Inline
dirThe text was updated successfully, but these errors were encountered: