X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Ffindparam.pl;h=679b9caf0d48892307e2ceb3b258e6663122426d;hb=d2f87ccd1d5f93afedc8f9f13b9f35260328614a;hp=0a559d168f8ca0761ca43dd224844ea62edcf8af;hpb=da8ba434964f98f569fad58e723c905d282942e6;p=infobot.git diff --git a/scripts/findparam.pl b/scripts/findparam.pl index 0a559d1..679b9ca 100755 --- a/scripts/findparam.pl +++ b/scripts/findparam.pl @@ -2,72 +2,72 @@ use strict; -my(%param, %conf, %both); +my ( %param, %conf, %both ); foreach (`find -name "*.pl"`) { chop; - my $file = $_; + my $file = $_; my $debug = 0; - open(IN, $file); + open( IN, $file ); while () { - chop; + chop; - if (/IsParam\(['"](\S+?)['"]\)/) { - print "File: $file: IsParam: $1\n" if $debug; - $param{$1}++; - next; - } + if (/IsParam\(['"](\S+?)['"]\)/) { + print "File: $file: IsParam: $1\n" if $debug; + $param{$1}++; + next; + } - if (/IsChanConfOrWarn\(['"](\S+?)['"]\)/) { - print "File: $file: IsChanConfOrWarn: $1\n" if $debug; - $both{$1}++; - next; - } + if (/IsChanConfOrWarn\(['"](\S+?)['"]\)/) { + print "File: $file: IsChanConfOrWarn: $1\n" if $debug; + $both{$1}++; + next; + } - if (/getChanConfDefault\(['"](\S+?)['"]/) { - print "File: $file: gCCD: $1\n" if $debug; - $both{$1}++; - next; - } + if (/getChanConfDefault\(['"](\S+?)['"]/) { + print "File: $file: gCCD: $1\n" if $debug; + $both{$1}++; + next; + } - if (/getChanConf\(['"](\S+?)['"]/) { - print "File: $file: gCC: $1\n" if $debug; - $conf{$1}++; - next; - } + if (/getChanConf\(['"](\S+?)['"]/) { + print "File: $file: gCC: $1\n" if $debug; + $conf{$1}++; + next; + } - if (/IsChanConf\(['"](\S+?)['"]\)/) { - print "File: $file: ICC: $1\n" if $debug; - $conf{$1}++; - next; - } + if (/IsChanConf\(['"](\S+?)['"]\)/) { + print "File: $file: ICC: $1\n" if $debug; + $conf{$1}++; + next; + } - # command hooks => IsChanConfOrWarn => both. - # note: this does not support multiple lines. - if (/\'Identifier\'[\s\t]=>[\s\t]+\'(\S+?)\'/) { - print "File: $file: command hook: $1\n" if $debug; - $both{$1}++; - next; - } + # command hooks => IsChanConfOrWarn => both. + # note: this does not support multiple lines. + if (/\'Identifier\'[\s\t]=>[\s\t]+\'(\S+?)\'/) { + print "File: $file: command hook: $1\n" if $debug; + $both{$1}++; + next; + } } close IN; } print "Conf AND/OR Params:\n"; -foreach (sort keys %both) { +foreach ( sort keys %both ) { print " $_\n"; } print "\n"; print "Params:\n"; -foreach (sort keys %param) { +foreach ( sort keys %param ) { print " $_\n"; } print "\n"; print "Conf:\n"; -foreach (sort keys %conf) { +foreach ( sort keys %conf ) { print " $_\n"; }