Subject: | Missing operators: equality comparison |
Date: | Mon, 09 Jan 2012 18:18:30 -0500 |
To: | bug-Math-VectorReal [...] rt.cpan.org |
From: | "Daniel Macks" <dmacks [...] netspace.org> |
There is no overloading of '==' or 'eq', so there is no way to use normal perl operators to determine if two variables that are Math::VectorReal objects are the same as each other. Math::MatrixReal provides a full set of overload operators, but Math::VectorReal is pretty sparse. As a result, Chemistry::File::InternalCoords is failing several self-tests. See https://rt.cpan.org/Public/Bug/Display.html?id=73857 for details specific to it. The quick solution there is simply to stringify the VectorReals and then string-compare those results--"works but feels like a hack". More proper would be to do pairwise comparison on the two vectors' elements.
dan
--
Daniel Macks
dmacks@netspace.org