- my $bug; # Number of current bug
- my $subject; # Subject for current bug
- my $pkg; # Name of current package
- my $file; # Name of statusfile
- my $sect; # Section of current package
- my $mnt; # Maintainer of current package
+ my $filename = shift;
+ open STATUS, "<", $filename
+ or die "$filename: $!";
+
+ while (1) {
+ chomp (my $type = <STATUS>);
+ if ($type eq 'package') {
+ chomp (my $package = <STATUS>);
+ chomp (my $section = <STATUS>);
+ chomp (my $maintainer = <STATUS>);
+ my $blank = <STATUS>;
+
+ $section{$package} = $section;
+ $maintainer{$package} = $maintainer;
+ }
+ if ($type eq 'bug') {
+ my $bug = {};
+ while (1) {
+ my $line = <STATUS>;
+ last if ($line !~ /^(.*?)=(.*)$/);