diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-04-12 20:46:20 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-04-12 20:46:20 +0000 |
commit | df073d6e09c0f87fb2e88cc215ace843a5851d4a (patch) | |
tree | 1c15ce909d3e0353b21bbd909e6720fd485a3a53 /utils/devel/find-use | |
parent | 65458125b8f3814fd6ef4d07b55ab69f62f5a528 (diff) |
Formatting with Perltidy
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1068 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'utils/devel/find-use')
-rwxr-xr-x | utils/devel/find-use | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/utils/devel/find-use b/utils/devel/find-use index fa2014f0..c90ddcc5 100755 --- a/utils/devel/find-use +++ b/utils/devel/find-use @@ -1,4 +1,5 @@ #!/usr/bin/perl -w + =head1 NAME find-use @@ -27,7 +28,6 @@ Distributed under the terms of the LedgerSMB code. =cut - use strict; use warnings; @@ -35,25 +35,29 @@ open GREP, "grep -r '^use ' . |"; use Module::CoreList; my %uselines; -while(<GREP>) { - next if /LedgerSMB::/; - next if /use warnings/; - next if /use strict/; - next if /use vars/; - chomp; - my ($file, $useline) = m/^([^:]+):use\s(.*?)$/; - $uselines{$useline}||=[]; - push @{$uselines{$useline}}, $file; +while (<GREP>) { + next if /LedgerSMB::/; + next if /use warnings/; + next if /use strict/; + next if /use vars/; + chomp; + my ( $file, $useline ) = m/^([^:]+):use\s(.*?)$/; + $uselines{$useline} ||= []; + push @{ $uselines{$useline} }, $file; } my %modules; -foreach my $useline (keys %uselines) { +foreach my $useline ( keys %uselines ) { - my ($module) = grep { $_ } $useline =~ /(?:base ['"]([a-z:]+)|([a-z:]+)(?:\s|;))/i; - my $version = Module::CoreList->first_release($module); - $modules{$module} = $version||0; + my ($module) = + grep { $_ } $useline =~ /(?:base ['"]([a-z:]+)|([a-z:]+)(?:\s|;))/i; + my $version = Module::CoreList->first_release($module); + $modules{$module} = $version || 0; } -foreach my $mod (sort { $modules{$a} == 0 ? -1 : $modules{$b} == 0 ? 1 : 0 or $a cmp $b } keys %modules) { - printf "%2.6f : %s\n", $modules{$mod}, $mod; +foreach my $mod ( + sort { $modules{$a} == 0 ? -1 : $modules{$b} == 0 ? 1 : 0 or $a cmp $b } + keys %modules ) +{ + printf "%2.6f : %s\n", $modules{$mod}, $mod; } |