summaryrefslogtreecommitdiff
path: root/scripts/stats.pl
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2013-04-06 13:14:43 +0200
committerPaul Buetow <paul@buetow.org>2013-04-06 13:14:43 +0200
commitd3982ec72b255876db00825605d1d5aae0bc313e (patch)
treea653552b7d229f7f27262980da7550d39961a102 /scripts/stats.pl
parent796609174e5ecb35fab992969e7690186840048a (diff)
tagging ychat-0.7.7.1ychat-0.7.7.1
Diffstat (limited to 'scripts/stats.pl')
-rwxr-xr-xscripts/stats.pl24
1 files changed, 11 insertions, 13 deletions
diff --git a/scripts/stats.pl b/scripts/stats.pl
index 38cc67c..e5cc2b3 100755
--- a/scripts/stats.pl
+++ b/scripts/stats.pl
@@ -9,6 +9,7 @@ use strict;
use scripts::modules::file;
my %stats;
+my $param = shift;
&recursive(".");
@@ -17,19 +18,16 @@ $stats{"Lines total"} = $stats{"Lines of source"}
+ $stats{"Lines of text"}
+ $stats{"Lines of HTML"};
-my $bool = 0;
-foreach ( sort keys %stats )
-{
- if ($bool == 0)
- {
- print "$_ = " . $stats{$_} . "\n";
- $bool = 1;
- }
- else
- {
- print "$_ = " . $stats{$_} . "\n";
- $bool = 0;
- }
+unless (defined $param) {
+
+ print "$_ = " . $stats{$_} . "\n"
+ for ( sort keys %stats );
+
+} else {
+
+ print $stats{$_} . " "
+ for sort keys %stats;
+
}
print "\n";