in reply to Check if all used modules are use'ed

No, there is not such a script.

Take the following code, which module is used, but not imported?

#!/usr/bin/perl use strict; use warnings; my $class1 = $ARGV[rand @ARGV]; my $class2 = $ARGV[rand @ARGV]; $class1 =~ s{::}{/}g; require "$class1.pm"; $class2->method(); __END__
Even if you know the arguments, you still don't know which module is going to be used, and whether it's used without being required.

Replies are listed 'Best First'.
Re^2: Check if all used modules are use'ed
by Sewi (Friar) on Oct 27, 2011 at 12:34 UTC

    Finding all special cases would require a package/namespace list from a running task.

    Any solution finding the basic things would be ok as there are very few (if any) code pieces with dynamic dependencies in this project.