[padb-devel] [padb] r250 committed - Add an implicit return to _config_help and indent the help for every f...
codesite-noreply at google.com
codesite-noreply at google.com
Mon Sep 14 21:12:56 BST 2009
Revision: 250
Author: apittman
Date: Mon Sep 14 13:11:52 2009
Log: Add an implicit return to _config_help and indent the help for every
function to indented
to the level that's appropriate for that function.
http://code.google.com/p/padb/source/detail?r=250
Modified:
/branches/cleanup/src/padb
=======================================
--- /branches/cleanup/src/padb Mon Sep 14 11:45:20 2009
+++ /branches/cleanup/src/padb Mon Sep 14 13:11:52 2009
@@ -4471,9 +4471,18 @@
}
sub _config_help {
- my ( $max_len, $mode ) = @_;
+ my ($mode) = @_;
print "\nOptions for mode '$allfns{$mode}{arg_long}'\n";
+
+ my $max_len = 0;
+
+ foreach my $key ( sort keys %{ $conf{mode_options}{$mode} } ) {
+ if ( length($key) > $max_len ) {
+ $max_len = length($key);
+ }
+ }
+
foreach my $key ( sort keys %{ $conf{mode_options}{$mode} } ) {
my $name = $key;
$name =~ s{_}{-}gx;
@@ -4485,6 +4494,7 @@
printf " %$max_len" . "s = undef\n", $name;
}
}
+ return;
}
sub config_help {
@@ -4512,10 +4522,10 @@
}
if ( defined $mode ) {
- _config_help( $max_len, $mode );
+ _config_help($mode);
} else {
foreach ( sort keys %{ $conf{mode_options} } ) {
- _config_help( $max_len, $_ );
+ _config_help($_);
}
}
return;
More information about the padb-devel
mailing list