in reply to "Can't happen" bugs

Nearly any encoding problem makes me go bonkers.

Recently, I had a function that took a WWW::Curl object and some parameters, which then sets the parameters on the Curl object. Something like this:

set_opts({ curl => $curl, url => 'http://www.example.com/path/', . . . });

When $curl->perform method was called to run the query, no query was actually being sent. After doing some debugging, I found out that the URL within the object was gibberish.

I fixed it by changing the set_opts() parameter like this:

set_opts( 'http://www.example.com/path/', { curl => $curl, . . . });

Which shouldn't have any effect in a sane world, but in a world where encoding issues come up, it does.

I swear that encoding problems are non-deterministic, and should be used as a cryptographically-secure source of random numbers.


"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.