update
authorshort <>
Fri, 16 May 2003 16:27:31 +0000 (16:27 +0000)
committershort <>
Fri, 16 May 2003 16:27:31 +0000 (16:27 +0000)
Web.pm

diff --git a/Web.pm b/Web.pm
index 663cdb2..8449555 100644 (file)
--- a/Web.pm
+++ b/Web.pm
@@ -54,18 +54,10 @@ my($class,%args)=@_;
        $cvs_id_html=join " ",@cvs_id_split;
 }
 
-# $args{"ListItem"}=\%...;
-sub init_project ($%)
+sub print_project ($)
 {
-my($class,%args)=@_;
+my($class,$ListItem)=@_;
 
-       my $ListItem=$args{"ListItem"};
-       my $name=$ListItem->{"name"};
-       $name=~s#<a\s[^>]*>([^<]*)</a>#$1#g;
-       init($class,
-                       "title"=>$name,
-                       %args);
-       heading();
        print "<h1>".$ListItem->{"name"}."</h1>\n";
        print $ListItem->{"description"};
        print "<hr />\n";
@@ -110,11 +102,17 @@ my($class,%args)=@_;
                                }},
                {"key"=>"maintenance","text"=>"Currently maintained?","format"=>sub ($) {
                                my %known=(
-                                               "finished"=>"Project is finished. No serious bugs known. No new features planned.",
-                                               "dead"=>"Project became dead code. Some updates may be needed. It is no longer used.",
+                                               "finished"=>"Project is finished. Possible bug reports welcome although project not actively developed.",
+                                               "dead"=>"Project became dead code, some updates would be required. It is no longer used, project is not supported.",
+                                               "obsolete"=>"Obsolete as some other existing package superseded this one.",
+                                               "merge"=>"Functions of this package should be merged to some other one.",
+                                               "update"=>"Package needs updating to be fully usable, patches welcome.",
+                                               "accepted"=>"This patch was accepted by the original package author. It has no longer any separate meaning.",
                                                );
                                return $known{$_[0]};
                                }},
+               {"key"=>"reason","text"=>"Reason"},
+               {"key"=>"sponsorship","text"=>"Sponsoring Company"},
                {"key"=>"language","text"=>"Programming language","format"=>sub ($) {
                                return "<a href=\"http://java.sun.com/\">".CGI::escapeHTML($_[0])."</a>"
                                                if $_[0]=~/^Java\b/;
@@ -127,7 +125,7 @@ my($class,%args)=@_;
 
 sub tableit_func
 {
-my($tableit,$val,$key)=@_;
+my($tableit,$val,$key,$ListItem)=@_;
 
        print "<tr><td>";
        if (!ref $tableit->{"text"}) {
@@ -135,6 +133,7 @@ my($tableit,$val,$key)=@_;
                }
        else {
                my $textfunc=$tableit->{"text"};
+               my $key=$key;
                print &$textfunc($key);
                }
        print ":</td>";
@@ -144,21 +143,38 @@ my($tableit,$val,$key)=@_;
                $val=$valn if defined $valn;
                }
        print "<td>$val</td></tr>\n";
+       delete $ListItem->{$key};
 }
 
        for my $tableit (@table) {
                if (!ref $tableit->{"key"}) {
-                       tableit_func($tableit,$ListItem->{$tableit->{"key"}},$tableit->{"key"}) if $ListItem->{$tableit->{"key"}};
+                       tableit_func($tableit,$ListItem->{$tableit->{"key"}},$tableit->{"key"},$ListItem) if $ListItem->{$tableit->{"key"}};
                        }
                else {
                        for my $key (keys(%$ListItem)) {
                                my $keyregex=$tableit->{"key"};
                                next if $key!~/$keyregex/;
-                               tableit_func($tableit,$ListItem->{$key},$key);
+                               tableit_func($tableit,$ListItem->{$key},$key,$ListItem);
                                }
                        }
                }
        print "</table>\n";
+       print "<p>&nbsp;</p>\n";
+}
+
+# $args{"ListItem"}=\%...;
+sub init_project ($%)
+{
+my($class,%args)=@_;
+
+       my $ListItem=$args{"ListItem"};
+       my $name=$ListItem->{"name"};
+       $name=~s#<a\s[^>]*>([^<]*)</a>#$1#g;
+       init($class,
+                       "title"=>$name,
+                       %args);
+       heading();
+       $class->print_project($ListItem);
 }
 
 sub fatal (;$)
@@ -229,6 +245,17 @@ my($file,$alt,$attrs)=@_;
                        .(!defined($attrs) ? "" : " ".$attrs)." />");
 }
 
+sub readfile ($$)
+{
+my($class,$filename)=@_;
+
+       local *F;
+       open F,$filename or die "Cannot open \"$filename\": $!";
+       local $/=undef();
+       my $data=<F>;
+       close F;
+       return $data;
+}
 
 sub heading (;$$)
 {