A) Sure, store it in a database. It might be over kill now, but it probably won't do any harm and it makes it very expandable/scalable.
B) Write a perl script that grabs the data from the database and outputs the html (unless you have extreme usage requirements/processin g involved). As for mixing html and perl, use HTML::Template to avoid that.
C) If you have the appropiate database (oracle maybe?) you might be able to add a 'stored procedure' that lets you generate the html every time a row is added, but most databases won't let you, as far as I know. Your other options are to either make an interface for inserting rows which will kick off the html generation or a cron job. | [reply] |
I would write a small script using the CGI module.
use CGI qw(:all);
Also use the DBI, to access the database.
Your scirpt is launched,
if there are no arguments then print a list of all routers, all routers in list are a link back to this script like script.pl?router_name=aab.dsd.11.com
if there is an argument (router_name) then list all interfaces for that router.
simple enough just get CGI, and DBI, and look into how to use them.
| [reply] |
You question isnt very clear at all, nor is the data. Im assuming you have more than just a list of interfaces. If you have several pieces of similar and interrelated dynamic data to store, yes, use a database. If its not really, or all that dynamic, dont bother.
There are several HTML templating modules, HTML::Template, Template Toolkit, at least one of those has a DBI plugin, as far as I know, so you can just throw it a statement object/result, and have it loop around the list of interfaces, outputting them.
(No idea why you asked me specifically for an answer on this.. HTML aint my ting.)
C. | [reply] |