Since the undef SV is shared between all undefined values, one could modify undef using a feature in Perl 5.8. (I only thought of this because of the solution to #13 of How's your Perl? (II)).
At the beginning of your program (possibly in a BEGIN block) (completely untested):
undef = Object::EveryMethod->new;
And override Object::EveryMethod for string/num/bool to behave like undef normally does.
"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.