For a specific .pl file it would traverse the heirarchy of inherited PMs and produce a PL file with local subroutines copied in. The larger body of code not used in the .pm files would not be there.
I don't know of anything off-hand that would strip out the unused functions for you.
There are a couple of packages around that will merge all of your modules into a single file, including my Devel::PreProcessor. (You can also use it to strip out comment lines and POD sections.)
You can use Devel::Cover to list which of your subroutines are called and which are not, although this depends on you having test scripts or manually running the program several times to exercise all of the possible code paths.
It would be up to you to combine these two capabilities and strip out the unused functions.
In reply to Re: Optimise Perl code pl file
by simonm
in thread Optimise Perl code pl file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |