Welcome to the Monastery | |
PerlMonks |
Simple Data storageby Hissingsid (Sexton) |
on Mar 08, 2004 at 11:55 UTC ( [id://334770]=perlquestion: print w/replies, xml ) | Need Help?? |
Hissingsid has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
Although I've been dabling in Perl CGI scipting for a couple of years I'm still very much a novice (had to get a Monk pun into my first post)! I'm looking for the simplest way to store contents and html page design in separate files. Here's what I'm thinking of doing and would appreciate comments on the sanity of the idea. I'm avoiding using any form of database or parsing of data when a web page is sent to the browser. The contribute script will print a file to a specified directory with the data simply held as variables as they would be declared in a script. $variable = "lots of text"; The "present to browser" script will decode the URL and covert this into directory and file to include variables. $inc = #path to file to include require "$inc"; Imediately all of the variables stored in that external file will be available to me without any fancy parsing. In effect this will be similar to Blosxom but without the need to pars the external files. I can't figure why someone would convert variables to write out to a file only to have to parse them when they come back in. It seems like a complete waste of resources to me. I don't need to be able to search or sort records users and editors will just navigate. Directory structure will be stored in a file containing just an array, one per directory. This will be added to as pages are added and reduced as they are deleted. Am I completely mad or is this a good quick solution. Any comments or advice would be much appreciated. Many thanks Sid
Back to
Seekers of Perl Wisdom
|
|