in reply to Making a distribution for my website

Other, splendid answers apart, the easiest way to list all files use'ed &/or require'ed is to dump the keys of the %INC hash e.g. add an option to your program (by which I'll assume you mean a script) solely to dump the said data. Thereafter it's a trivial task to get the package names ...
my @pkgs = map { s,[/\\],::,g; s,\.pm$,,} keys %INC;

A user level that continues to overstate my experience :-))