our $usage1 = <<'END';
usage: ../fyvzl [<options>] <database-file> <action> <arg>...
options
- -l<minrandlength> (for create/choose, minimum randlength)
-m<maxperuser>
-d<dom>
-q<qualdom>
-C (show comments in output)
-h (display help)
+options for alphanum generation
+ -l<minrandlength> (for create/choose alphanum, minimum randlength)
END
our $usage2 = <<'END';
actions
END
our %usage_genopts = (
'alphanum' => <<END,
- -l<randlength> (number of letters+digits)
+ -l<randlength> (number of letters+digits)
END
);
#/
use DBI;
use POSIX;
-our $randlength;
-
our $maxperuser = 10000;
our $qualdom;
our $dbh;
our $genmethod = 'alphanum';
# for alphanum
+# options
our $minrandlength = 6;
-our $maxrandlength = 50;
+our $maxrandlength = 100;
+# genopts
+our $randlength;
sub nextarg () {
die "too few arguments\n" unless @ARGV;
sub genopt_alphanum {
local ($_) = @_;
if (m/^-l(\d+)$/) {
- $randlength = $1;
+ $randlength = 0+$1;
die "length out of range $minrandlength..$maxrandlength\n"
unless ($minrandlength<=$randlength &&
$randlength<=$maxrandlength);