I would appreciate learning more about the return types for subroutines as used within the custom answer checker. Below is code that was distilled from the bottom example on the wiki for the Custom Answer Checker page. The simple "override" subroutine does not appear to have any effect on the answer checker. The nested (wrap) routine on the other hand, behaves in the expected manner by permitting other answers, say 4. For clarity, it would be nice to cast the return value in the simple "override" routine to permit its direct use.
DOCUMENT();
loadMacros( "PGstandard.pl", "MathObjects.pl");
$val=Real(3);
BEGIN_TEXT
Enter the number 3: \{ans_rule(15)\}
END_TEXT
ANS($val->cmp(checker => override() ));
# ANS($val->cmp(checker => wrap() ));
sub override { return 1; }
sub wrap {
return sub { return override(); };
}
ENDDOCUMENT();