in reply to Is there an ideal module size or subroutine size?

Few of my modules get over about 600 lines, and most of them are under 400 lines.

There are several reasons for that: OTOH, modules which deal with big, monolithic things that are really complex might need to be big, monolithic things that are really complex. A number of CPAN modules have files that are multiple thousands of lines long. MIME::Lite is over 3k lines, IIRC. PDF::API2 has a few files over 30k lines among its supporting modules (all of which appear to be East Asian font sets). PDF::API2::Simple sits at over 1000 lines. DBI.pm is over 7k lines.

One project I've been developing and maintaining for months has a number of modules specific to it. It also has a number of modules reused from other projects. Some of those have been improved and re-reused back into the original projects. There are several modules I'm using from CPAN for this project that are 2000 lines or longer, but none of the ones I've written are more than 1000 lines. That's one of the joys of CPAN. Someone else has done many of the big, hairy modules.
  • Comment on Re: Is there an ideal module size or subroutine size?