| 1 | #!/usr/local/bin/perl -w | ||
| 2 | ######################################################################## | ||
| 3 | # This is not designed to be a serious application but is designed to | ||
| 4 | # be part of the testing of the RPG::Traveller::Person module. | ||
| 5 | # | ||
| 6 | # However if a game master wanted to create a bunch of raw recruits | ||
| 7 | # this program would do the trick... :-) | ||
| 8 | # | ||
| 9 | # PODNAME: CreateBasePeople.pl -- Create a bunch of "base" people. | ||
| 10 | # ABSTRACT: CreateBasePeople.pl [--qty=10] [--debug] | ||
| 11 | |||
| 12 | use strict; | ||
| 13 | use RPG::Traveller::Person; | ||
| 14 | use Getopt::Long; | ||
| 15 | use Data::Dumper; | ||
| 16 | my $debug = 0; | ||
| 17 | my $nchars = 10; | ||
| 18 | |||
| 19 | my $res = GetOptions( | ||
| 20 | "qty=i" => \$nchars, | ||
| 21 | "debug" => \$debug | ||
| 22 | ); # debug is really for the author only | ||
| 23 | |||
| 24 | my $person = undef; | ||
| 25 | |||
| 26 | foreach ( 1 .. $nchars ) { | ||
| 27 | $person = RPG::Traveller::Person->new(); | ||
| 28 | print Dumper($person) if $debug; | ||
| 29 | exit if !$person; | ||
| 30 | $person->initUPP(); | ||
| 31 | printf "%s\n", $person->toString(); | ||
| 32 | } | ||
| 33 | |||
| 34 | exit(0); | ||
| 35 | |||
| 36 | __END__ |