Gertjan has asked for the wisdom of the Perl Monks concerning the following question:
Hi!
We have a lot of smaller and larger Perl-scripts and applications. In the course of time, new functionality is added and old code gets refactored or removed. Often people forget to remove imported modules when they are no longer needed, partly because it can be hard to see if a module is actually used. This adds a lot of unnecessary dependencies to the software.
How do you guys check which imports are actually needed? Most of the times I find myself searching through the code for occurrences of the module, while checking CPAN to see which symbols are automatically imported. This however is a very cumbersome method, and prone to error.
Thanks!
Gertjan
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How do I check if imports are actually used?
by Anonymous Monk on Sep 16, 2013 at 09:00 UTC | |
Re: How do I check if imports are actually used?
by LanX (Saint) on Sep 16, 2013 at 13:37 UTC | |
Re: How do I check if imports are actually used? (script)
by tye (Sage) on Sep 16, 2013 at 16:28 UTC | |
Re: How do I check if imports are actually used?
by Your Mother (Archbishop) on Sep 16, 2013 at 13:48 UTC | |
by LanX (Saint) on Sep 16, 2013 at 14:16 UTC |