#!/usr/bin/perl =pod =head1 NAME display - script to display fragments of text on the web and elsewhere =head1 DESCRIPTION display started life as a way to concatenate fragments of handwritten HTML by date. While the script has since haphazardly accumulated several of the usual weblog features (comments, lightweight markup, feed generation, embedded Perl, poetry tools, stupid dependencies), it hasn't changed much in six years. The current version is intended to support FastCGI via CGI::Fast, if available, and otherwise operate as a traditional CGI or commandline utility. It may have some distance to go towards this goal. Entries are stored in a simple directory tree under C<$DISPLAY_CONF{ROOT_DIR}>. Like: archives/2001/1/1 archives/2001/1/1/sub_entry An entry may be either a plain text file, or a directory containing several such files + whatever else you'd like to store. If it's a directory, the file called "index" will be treated as the text of the entry, and all other lower case filenames without extensions will be treated as sub-entries or documents within that entry, and displayed accordingly. Directories may be nested to an arbitrary depth, though I don't promise that this won't break on you. A PNG or JPEG file with a name like 2001/1/1.icon.png 2001/1/1/index.icon.png 2001/1/1/whatever.icon.png will be treated as an icon for the appropriate entry file. =head2 MARKUP Entries may consist of hand-written HTML (to be passed along without further interpretation), a supported form of lightweight markup, or some combination thereof. Actually, an entry may consist of any darn thing you please, as long as Perl will agree that it is text, but presumably you're going to be feeding this to a browser. Special markup is indicated by a variety of XML-style container tags. B - evaluated and replaced by whatever value you return (evaluated in a scalar context): my $dog = "Ralph."; return $dog; This code is evaluated before any other processing is done, so you can return any other markup understood by the script and have it handled appropriately. B - actually keys to %TEMPLATE, for the moment: $TEMPLATE{dog} = "Ralph"; return '';

My dog is named ${dog}.

Embedded code and variables are mostly intended for use in F
and F