WeBWorK Main Forum

error message - cmp

error message - cmp

by Joel Trussell -
Number of replies: 1
I got the error message:
1. ERROR caught by Translator while processing problem file:
local/ECE514/HW3/ECE514_HW3_P2_hjt.pg **************** ERRORS from evaluating PG file:
 Can't locate object method "cmp" via package "80"
(perhaps you forgot to load "80"?) at line 83 of (eval 2672)

I had this happen before but it took me longer than I'd like to admit to determine that I'd not explicitly declared a perl variable as a MathObject.

I changed

$x = erf($t); # subroutine erf()
$x = Real(erf($t));
and all is well. Would you consider putting a hint in the error message that one might need to set a MathObject? Thanks
In reply to Joel Trussell

Re: error message - cmp

by Davide Cervone -
The error message is produced by Perl itself, not PG, so I don't think we can do anything about that. Sorry to say.