Production WTF Code on #perl - Fortune [possible satire]

dwaveanyone envy me? I'm refactoring production code that uses the fact that "" is defined, as a hash key.
dwaveif (ref $ref->{""} ne "ARRAY") {
dwave$ref->{""} = [$ref->{""},$_];
dwave} else {
dwave$ref->{""} = [@{$ref->{""}},$_];
dwave}
dwave:(
iankhey, that looks like fun.
integralHas the author been lynched yet?
* integralwould have used "\0" :-P
dwavethe best of it all, is that it's an XML parser
mauke$ref->{""} = [ref $ref->{""} eq "ARRAY" ? @{$ref->{""}} : $ref->{""}, $_]; # fixed
rindolfdwave: does this XML parser makes use of an existing XML parser from CPAN?
rindolfdwave: or does it do everything from scratch?
dwaverindolf: everything from scratch :)
rindolfdwave: nice!
dwaveI'm trying to get rid of it
rindolfdwave: re-inventing square wheels.
dwavethere's a home made Unicode lib too
dwave!
rindolfdwave: ouch!
shaldannonnice
iankBrilliant!
shaldannondwave: I suggest a dailywtf.com submission
rindolfdwave: yeah, I second shaldannon
Channel#perl
NetworkFreenode
TaglineProduction WTF Code on #perl
Published2009-12-14