WeBWorK Problems

questions about how pg macros get loaded

Re: questions about how pg macros get loaded

by Davide Cervone -
Number of replies: 0
I don't think that redefining macros in the main:: namespace gets transfered to the next invocation of the same child process (because main:: is set up new in the safe compartment for each invocation). If it did, then you would get a lot more of these messages, since any subroutine defined in one problem would then carry over to the following problems processed in the same child, and if it processed the same problem twice, the second time would "redefine" that subroutine since it would be left over from the first time around.

But I do think that redefining items in the preloaded namespaces (like Parser:: or Value::) would hold over. These are added to the safe compartment as pointers to the ones outside the safe compartment, so changes to them affect the next safe compartment. I know that it did at one point, but haven't checked recently, and I think I remember Sam working on changing how the safe compartment handled these external references.

Davide