?

Log in

No account? Create an account

September 6th, 2007

Perl is psychic!

Okay, you got to love this. Perl is psychic. It knows that an undefined value is a hash. I'm sorry, would be a hash if an alternate reality had been taken. But it wasn't, so that value is not a hash. It should be NULL. Very odd.

Click here for all the gory details.Collapse )

It is unfortunately not simple enough to provide a 6-line script which demonstrates this. It has something to do with the routine being inside a package, or the fact that the conditional isn't known until a file is read in and evaluated. I'm trying to figure out what the limitation is. But it's very odd, given that the code expects the undefined hash to have an address of 0.

Tags: