4 # Check for unhandled 'ListItem' fields.
5 # Copyright (C) 2003 Jan Kratochvil <project-www.jankratochvil.net@jankratochvil.net>
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; exactly version 2 of June 1991 is required
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 require 5.6.0; # at least 'use warnings;' but we need some 5.6.0+ modules anyway
22 use vars qw($VERSION $CVS_ID);
23 $VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; };
28 use lib qw(/home/short/lib/perl5/site_perl/5.6.0/i386-linux /home/short/lib/perl5/site_perl/5.6.0 /home/short/lib/perl5/site_perl/i386-linux /home/short/lib/perl5/site_perl /home/short/lib/perl5/5.6.0/i386-linux /home/short/lib/perl5/5.6.0 /home/short/lib/perl5/i386-linux /home/short/lib/perl5);
33 use constant ENTRIES=>"CVS/Entries";
34 use constant ENTRIES_LOG=>"CVS/Entries.Log";
38 for my $ENTRIES (ENTRIES,ENTRIES_LOG) {
40 next if !open E,$ENTRIES;
43 do { $dirs{$1}=1; next; } if m#^(?:A )?D/([^/]*)/#;
44 next if m#^/([^/]*)/# ;
46 warn "File $ENTRIES contains invalid line \"$_\": $!";
52 for my $dir (keys(%dirs)) {
53 require "$dir/ListItem.pm";
54 my $item=eval('\%My::Project::'.$dir.'::ListItem');
55 do { warn "Broken $dir/List.pm"; next; } if !defined %$item;
59 open(STDOUT,">/dev/null");
60 while (my($key,$ListItem)=each(%item)) {
62 My::Web->print_project($ListItem);
63 for my $attr (qw(priority name description)) {
64 delete $ListItem->{$attr};
67 print STDERR Data::Dumper->Dump([$ListItem],[$key]) if %$ListItem;