Subject: | Consider removing file access and code parsing features from Package and Distribution modules |
While checking excessive list of packages needed to install OrePAN2 it came to my attention that noticeable amount of those deps were needed because Parse::CPAN::Packages requires them.
Main offenders when it comes to number of dependencies seem to be Archive::Peek (pulls Moose etc.) and PPI. Currently on fresh core perl installing Parse::CPAN::Packages will install 80 distributions (at least on 5.10, number may be smaller on recent perls).
Without Archive::Peek and PPI dependency that number falls down to 27.
I also think those methods do not belong to Parse::CPAN::Packages if this distribution is supposed to be about 02packages.details.txt.gz parsing. I quickly looked through most of CPAN dists using P::C::P and only one of those I checked used any of those methods. Granted, there may be more users of those features outside of CPAN.
In case compatibility is a concern maybe Parse::CPAN::Packages should be left intact, but most of it internals should be refactored into separate dist with only one responsibility - parsing and presenting data from 02packages file?
I do consider ::Package and ::Distribution to be part of that responsibility, just without all those archive-peeking, file-parsing extras.
I hope that at least PPI features may be removed, as they are marked as experimental and even less useful than archive peeking.
I realize that this may be noticeable amount of work without big gains. In case you find any of those actions acceptable I may be able to work on that.
Thanks for your work!