I may be out of my realm here.  I use mostly perl for everything and have
done similar things.  Create a directory tree with the source files.  In the
source files use something like %%INCLUDE_HEADER%% for each part of the page
that changes and have the script use flat text files for the build.  Have
the script traverse the tree of the source files writing the output to the
html directory.  Whenver you update the flat text files, just run the script
from the command line or write it to run from the web with a password.

Mason does something similar I believe.
You can even have the script write in the %%INCLUDES%% dynamically if you
take in the input and assign it like so.
$$Var = $value;  instead of  $input{'key'} = $value;
Then do the substitutions like so.

foreach (@variables){
     $template_txt =~ s/%%$_%%/$$_/gi;
}

Works great for me.  You can then make any change to the source.html page
and the flat text file without having to change the script.
John Michael
Not a mod perl solution, but it will work.


----- Original Message -----
From: "Dave Rolsky" <[EMAIL PROTECTED]>
To: "Dave Seidel" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, December 22, 2000 9:28 PM
Subject: Re: Dynamic content that is static


> On 22 Dec 2000, Dave Seidel wrote:
>
> > I don't know if either Mason or Embperl offer static compilation, but
Mason has
> > caching and I believe that Embperl is getting caching. AxKit is also
very
> > cool, and caches.
>
> Using Mason to generate a set of HTML pages would not be too terribly
> difficult.
>
> If someone is interested in doing this and needs some guidance I'd be
> happy to help.  It would be nice to include an offline site builder with
> Mason (or as a separate project).
>
> -dave
>
> /*==================
> www.urth.org
> We await the New Sun
> ==================*/
>

Reply via email to