5
die "must specify arch" if not defined $ARGV[0];
9
$template{Fields} = [];
10
$template{'Description-Long'} = "";
13
foreach ( @{$template{Fields}} ) {
15
if ( ref $template{$_} eq "HASH" ) {
16
if ( defined $template{$_}->{$arch} ) {
17
print $template{$_}->{$arch};
19
print $template{$_}->{default};
26
print $template{'Description-Long'} . "\n";
29
$template{Fields} = [];
30
$template{'Description-Long'} = "";
37
} elsif ( m/^(\w+)(\[(\w+)\])?:\s+(.*)\s*$/ ) {
39
if ( defined $template{$1} and ref $template{$1} ne "HASH" ) {
43
$template{$1}->{default} = $_;
44
} elsif ( not defined $template{$1} ) {
45
push ( @{$template{Fields}}, $1 );
47
$template{$1}->{$3} = $4;
50
push ( @{$template{Fields}}, $1 );
53
$template{'Description-Long'} .= $_ . "\n";