| dwave | anyone envy me? I'm refactoring production code that uses the fact that "" is defined, as a hash key. |
| dwave | if (ref $ref->{""} ne "ARRAY") { |
| dwave | $ref->{""} = [$ref->{""},$_]; |
| dwave | } else { |
| dwave | $ref->{""} = [@{$ref->{""}},$_]; |
| dwave | } |
| dwave | :( |
| iank | hey, that looks like fun. |
| integral | Has the author been lynched yet? |
| * integral | would have used "\0" :-P |
| dwave | the best of it all, is that it's an XML parser |
| mauke | $ref->{""} = [ref $ref->{""} eq "ARRAY" ? @{$ref->{""}} : $ref->{""}, $_]; # fixed |
| rindolf | dwave: does this XML parser makes use of an existing XML parser from CPAN? |
| rindolf | dwave: or does it do everything from scratch? |
| dwave | rindolf: everything from scratch :) |
| rindolf | dwave: nice! |
| dwave | I'm trying to get rid of it |
| rindolf | dwave: re-inventing square wheels. |
| dwave | there's a home made Unicode lib too |
| dwave | ! |
| rindolf | dwave: ouch! |
| shaldannon | nice |
| iank | Brilliant! |
| shaldannon | dwave: I suggest a dailywtf.com submission |
| rindolf | dwave: yeah, I second shaldannon |