The evaluated answer is not an answer hash : ||.
...
Use of uninitialized value $new_rh_ans_evaluation_result in concatenation (.) or string at /opt/webwork/pg/lib/WeBWorK/PG/Translator.pm line 1337
sub test { return $_[0]; }
ANS( str_cmp( 'FALSE' )->withPostFilter(\&test) );
whereas the following works fine:
sub test { return $_[0]; }
ANS( str_cmp( 'FALSE' )->withPostFilter(sub { return test(@_); }) );
Is there maybe something about namespacing or evals going on so that the subroutine "test" is visible to the "sub" closure but not via a direct reference?