> Exception::Class doesn't avoid string comparisons, it just moves them elsewhere;
in reply to Re^11: eval to replace die?
in thread eval to replace die?
I think this is a misinterpretation on your side.
Chromatic is not arguing against string comparisons per se, but against converting complex structures (errors) into strings which then need to be parsed back into complex structures in other places. He is arguing against this in comparison to the possibility of just passing complex structures as they are and only convert them to strings when actually needed.
E::C is really only one way to do it. Just plain throwing hashes as exceptions makes things nicer because you can add things to them without any risk of breaking regexes when converting back to a complex structure on inspection.
At least that's how i read what he's saying.
As far as a workable example goes, what would be wrong with this: http://gist.github.com/616705 (updated to be more amenable to classic perlers)