From d3982ec72b255876db00825605d1d5aae0bc313e Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 6 Apr 2013 13:14:43 +0200 Subject: tagging ychat-0.7.7.1 --- scripts/stats.pl | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'scripts/stats.pl') 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"; -- cgit v1.2.3