summaryrefslogtreecommitdiff
path: root/fml/utils/bin
diff options
context:
space:
mode:
authorfukachan <fukachan>2003-10-17 06:18:09 +0000
committerfukachan <fukachan>2003-10-17 06:18:09 +0000
commit3d1164dce3eb7a9184a4b5deede6268446a2e775 (patch)
tree98e6479e64ac7da5cd49573056f4bb86ee9b7fcb /fml/utils/bin
parent17b76f14d2b89104db0feb0a63d24a6d6775ae9d (diff)
downloadfml8-3d1164dce3eb7a9184a4b5deede6268446a2e775.tar.gz
fml8-3d1164dce3eb7a9184a4b5deede6268446a2e775.tar.bz2
fml8-3d1164dce3eb7a9184a4b5deede6268446a2e775.zip
modify top class entries.
change top class sort order.
Diffstat (limited to 'fml/utils/bin')
-rwxr-xr-xfml/utils/bin/varclass.pl25
1 files changed, 20 insertions, 5 deletions
diff --git a/fml/utils/bin/varclass.pl b/fml/utils/bin/varclass.pl
index 6d4b4c6b..01f9714b 100755
--- a/fml/utils/bin/varclass.pl
+++ b/fml/utils/bin/varclass.pl
@@ -1,6 +1,6 @@
#!/usr/bin/env perl
#
-# $FML: varclass.pl,v 1.2 2003/06/23 04:40:32 fukachan Exp $
+# $FML: varclass.pl,v 1.3 2003/07/03 00:11:06 fukachan Exp $
# based on 'FML: check_varname.pl,v 1.3 2003/05/30 13:59:17 fukachan Exp'
#
@@ -45,11 +45,14 @@ sub init
default
domain
cgi
- sql ldap
- report_mail
- message_template
+ sql
+ ldap
+ message
+ reply_message
+ template_file
ml_local
x
+ post
smtp mail postfix qmail sendmail procmail)) {
$top{ $_ } = $_;
}
@@ -182,7 +185,7 @@ sub classfied
$b{ $base } = \@x;
}
- for my $top (sort keys %top) {
+ for my $top (sort _sort_top keys %top) {
print "$top {\n";
for my $base (sort keys %b) {
@@ -209,6 +212,18 @@ sub classfied
}
+sub _sort_top
+{
+ my $xa = $a;
+ my $xb = $b;
+
+ if ($xa =~ /_command$/) { $xa = "command_$xa";}
+ if ($xb =~ /_command$/) { $xb = "command_$xb";}
+
+ $xa cmp $xb;
+}
+
+
sub first_match
{
my ($x) = @_;