modperl branch collapsed back to MAIN trunk, man!
[www.jankratochvil.net.git] / project / Nokia61 / Index.html.pl
similarity index 57%
rename from project/Nokia61/index.html.pl
rename to project/Nokia61/Index.html.pl
index bb28341..82b1953 100755 (executable)
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 
+package project::Nokia61::Index;
 require 5.6.0; # at least 'use warnings;' but we need some 5.6.0+ modules anyway
-use vars qw($VERSION $CVS_ID);
-$VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; };
-$CVS_ID=q$Id$;
+our $VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; };
+our $CVS_ID=q$Id$;
 use strict;
 use warnings;
 
+BEGIN{ open F,"Makefile"; our $top_dir=pop @{[split /\s/,(grep /^top_srcdir/,<F>)[0]]}; eval "use lib '$top_dir'"; close F; }
 use My::Web;
-use project::Nokia61::ListItem;
+Wuse 'My::Project';
+Wuse 'project::Nokia61::ListItem';
 
 
-My::Web->init_project(
-               "ListItem"=>\%My::Project::Nokia61::ListItem,
+My::Project->init_project(
+               "__PACKAGE__"=>__PACKAGE__,
+               "ListItem"=>\@project::Nokia61::ListItem::ListItem,
                );
 
-print <<'HERE';
-<iframe src="Nokia61.php?base=.%2F" width="90%" height="500" />
+do { My::Web::make("make -s $_") if ! -f $_; } for ("./Nokia61");
+print <<"HERE";
+<table border="0" width="100%">
+       <col width="0*" />
+       <col width="1*" />
+       <tr>
+               <td align="left">
+<iframe src="Nokia61.php?base=.%2F" width="500" height="600">
 <a href="Nokia61.php?base=.%2F">Program on-line</a>.
 </iframe>
+               </td>
+               <td align="center">@{[ img 'Nokia61.jpeg','Illustration' ]}</td>
+       </tr>
+</table>
 HERE
 
 My::Web->footer();