[Pdx-pm] Ugly code!

Ovid poec at yahoo.com
Wed May 28 16:58:30 CDT 2003


--- Austin Schutz <tex at off.org> wrote:
> 	Just out of curiosity, what's the ugliest code you've ever seen in
> the wild (no names attached, to protect the guilty)?

Coincidentally, I was working on some of that yesterday:

  sub connect {
      my $self = shift;
      return $self;
  }

I was pulled off of that project before I could fix this and similar issues.  The code was full of
little gems like that.  It dawned on me that I could have fun and do stuff like:

  my $object = $object->connect->connect->connect->connect->connect;

(It's effectively a no-op)

Cheers,
Ovid

=====
Ovid                       http://www.perlmonks.org/index.pl?node_id=17000
Web Programming with Perl  http://users.easystreet.com/ovid/cgi_course/
Silence Is Evil            http://users.easystreet.com/ovid/philosophy/indexdecency.htm

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com



More information about the Pdx-pm-list mailing list