8 ~/ledgersmb # utils/devel/find-use
9 0.000000 : HTML::Entities
10 0.000000 : Locale::Maketext::Lexicon
11 0.000000 : Module::Build
16 This util is useful for package builders to identify all the CPAN dependencies we've made. It required Module::CoreList (which is core, but is not yet in any stable
17 release of perl) to determine if a module is distributed with perl or not. The output reports which version of perl the module is in. If it reports 0.000000, then the
18 module is not in core perl, and needs to be installed before Lx-Office will operate.
22 http://www.ledgersmb.org/ - The LedgerSMB team
26 Distributed under the terms of the GNU General Public License v2.
33 open GREP, "grep -r '^use ' . |";
40 next if /use warnings/;
44 my ($file, $useline) = m/^([^:]+):use\s(.*?)$/;
45 $uselines{$useline}||=[];
46 push @{$uselines{$useline}}, $file;
50 foreach my $useline (keys %uselines) {
52 my ($module) = grep { $_ } $useline =~ /(?:base ['"]([a-z:]+)|([a-z:]+)(?:\s|;))/i;
53 my $version = Module::CoreList->first_release($module);
54 $modules{$module} = $version||0;
57 foreach my $mod (sort { $modules{$a} == 0 ? -1 : $modules{$b} == 0 ? 1 : 0 or $a cmp $b } keys %modules) {
58 printf "%2.6f : %s\n", $modules{$mod}, $mod;