[Pdx-pm] Ugly code!

Austin Schutz tex at off.org
Wed May 28 16:50:04 CDT 2003


	Just out of curiosity, what's the ugliest code you've ever seen in
the wild (no names attached, to protect the guilty)?
	By ugly I mean stuff that is so bizarre and/or complicated with
either no docs or misleading docs, not intentionally obfuscated stuff.
	Of my own stuff I think some of the ugliest looks like:

      if (exists(${*$read_handle}{exp_Pid})
          and (${*$read_handle}{exp_Pid})
          and (! kill(0,${*$read_handle}{exp_Pid}))) {
        print STDERR "Got EOF (${*$read_handle}{exp_Pty_Handle} died) reading ${
*$read_handle}{exp_Pty_Handle}\r\n"
          if ${*$read_handle}{"exp_Debug"};
        last CONNECT_LOOP unless defined(${${*$read_handle}{exp_Function}}{"EOF"
});
        last CONNECT_LOOP unless &{${${*$read_handle}{exp_Function}}{"EOF"}}(@{$
{${*$read_handle}{exp_Parameters}}{"EOF"}});
      }

	so ugly you can smell it just by looking at it. Ugh!

	Austin



More information about the Pdx-pm-list mailing list