in reply to Using Safe to reval complex math

Safe::permit takes an Opcode, and "sqrt" is part of the :base_math category, so double check that you're calling the version you think you are. Also try checking the value of $@ after the call to reval.


"The dead do not recognize context" -- Kai, Lexx

Replies are listed 'Best First'.
Re: Re: Using Safe to reval complex math
by Anonymous Monk on Jun 05, 2003 at 22:03 UTC

    Thanks for the feedback.

    I am actually checking $@, just not in the snippet. That is how i caught the above griping about Can't locate object method "make".

    In different permutations of things I have tried, I have had it using the base sqrt as well as the Math::Complex::sqrt. It is easy to tell the difference, because base sqrt will return something like Can't take sqrt of -4 whereas Math::Complex will give you 2i

    --Anonymous Original Poster Monk