True but I have worked on worse. The codebase we inherited from SQL-Ledger is quite a bit worse and was even more poorly commented when we forked (the only comments, aside from two lines describing the module, and copyright notices, were magic comments which if you delete things, stuff breaks).
And some of the modules were 4-5k lines with 1000-line functions. In a codebase of over 100k lines :-P. As we continue to pull out this logic, our codebase increases in functionality and decreases rather significantly in size.
Oh, and it was Perl which relied on sloppy global scoping and so you couldn't test it.
But hey, we are replacing the code at a pretty good clip.
What is really frustrating with the SQL-Ledger codebase (at least as of 2.6 and 2.8, I haven't looked at 3.0) though and is probably the case in the code you are linking to is that the developer had over 10 years of progress in this and still never seemed to manage to improve:
IS->post_invoice(\%myconfig, \%$form);
Really? That's like pass by reference to dereferenced reference, right?It's one thing to write crappy software. It's quite another to write it for over a decade and never improve.