Here is the simplest reproducible for my problem:
#!/usr/bin/env perl
use 5.16.3;
say "Got back ", test_print();
use Inline Python => <<'END_OF_PYTHON_CODE';
def test_print() -> int:
print("In the python test print")
return 32
END_OF_PYTHON_CODE
When run simply:
$ perl small.pl
In the python test print
Got back 32
But when redirected:
$ perl small.pl | tee foo
Got back 32
$ cat foo
Got back 32
What could I be doing wrong such that Inline::Pythoncode fails to print to a redirected output?