[Omaha.pm] We nuked 36,717 lines of Perl code today

Jay Hannah jay at jays.net
Wed Feb 9 16:47:26 PST 2005


I wrote an OO base class yesterday that is so re-usable that we got rid 
of 36K lines of Perl code today.

Don't worry, we didn't actually *write* all that code we just threw 
away -- it was all auto-generated (by another Perl script (surprise!)): 
one class for each of our 300+ database tables.

The new way shoves a lot of OO closure goo into a single, central 
location instead of copies of it in every class.

There's only 147,075 more lines of Perl left for me to optimize! (In 
this "project"...)

Woof!

j

$ cvs checkout -D2005-02-08 -d MVC_y source/MVC
$ wc -l `find MVC_y -name "*.pm"` | tail
     107 MVC_y/Control/Multiplex/Payload.pm
     408 MVC_y/Control/Multiplex/Buffers.pm
     100 MVC_y/Control/Multiplex/Children.pm
     187 MVC_y/Control/Multiplex/Buffer.pm
      34 MVC_y/Control/Globals.pm
     232 MVC_y/Control/Hotels.pm
     232 MVC_y/Control/RatesAvail.pm
     632 MVC_y/Control/Multiplex.pm
     420 MVC_y/Control/Logger.pm
  183792 total

$ cvs checkout -d MVC_t source/MVC
$ wc -l `find MVC_t -name "*.pm"` | tail
     107 MVC_t/Control/Multiplex/Payload.pm
     408 MVC_t/Control/Multiplex/Buffers.pm
     100 MVC_t/Control/Multiplex/Children.pm
     187 MVC_t/Control/Multiplex/Buffer.pm
      34 MVC_t/Control/Globals.pm
     232 MVC_t/Control/Hotels.pm
     232 MVC_t/Control/RatesAvail.pm
     632 MVC_t/Control/Multiplex.pm
     422 MVC_t/Control/Logger.pm
  147075 total



More information about the Omaha-pm mailing list