Index < Previous     Next >

WPP is a small perl5 script that allows preprocessing of html files.
You can define variables, which are abbreviations for longer constructs, and include common html fragments.
It's useful for giving an uniform layout to different html pages.
It can be used into cgi-bin programs for automatic generation of pages. With less html code inside them you can make more flexible and readable scripts.

WPP provides four separate facilities that you can use as you see fit:

  • Inclusion of text/html fragments.
  • Variables expansion.
  • Conditional generation.
  • Macros expansion.

News (2004/07/09)
Removed Safe eval code.
INLINE error now prints eval code with line numbers.
Inside eval code now you can safely use print instead of returning output. (2003/06/18)
Removed debian packaging files.
Index User Manual
  1. Command line switches
  2. Getting started
  3. A step by step example
  4. Variables and constants
  5. Directives
  6. Macros
  7. Configuration variables and directives
  8. Keywords list
  9. The standard macro library wpplib
  10. Links and references
  11. Test page
License [ ^ ]
WPP is distributed under the terms of the GNU General Public License (GPL). As such, you can use this program free of charge but there is no warranty.

[Preprocessed by WPP]

Feel free to link WPP by adding the official logo into your web pages.

Download WPP [ ^ ]
SourceForge Logo The program and the documentation, including this file you are reading, is available as tgz, zip, rpm and deb at the project page

Debian packages are available thanks to Adam Byrtek:

  1. Debian stable
  2. Debian unstable

Mailing Lists [ ^ ]
Here you can receive a message only when WPP updates.
If this form doesn't work you can subscribe by sending a message to
For unsubscribing simply send a message to
You can also read it through the web interface.
WPP developers mailing list. Here you can send your feature requests, bug reports, patches, ...
If this form doesn't work you can subscribe by sending a message to
For unsubscribing simply send a message to
You can also read it through the web interface.
If you have some troubles and those forms don't work mail me everything at
Why using WPP? [ ^ ]
I've written WPP insipred by cpp (the C preprocessor). The cpp and m4 are a couple of preprocessor available for almost every system but the syntax of them is quite undistinguishable inside a text/html source.
The prototype for WPP was written in awk and it can do only templates inclusion and few other things, then I've started studying perl and so WPP became what you're seeing.
The @ delimiter was taken from autoconf while looking inside the config.status files.
Installing WPP [ ^ ]
Just copy the script named wpp into some convenient directory in your PATH (i.e. /usr/local/bin). You should probably put this file somewhere safe in case you want to refer to it later.
You may need to change the first row of the wpp script in order to match the correct path for your perl interpreter.
Known bugs [ ^ ]
Actually WPP cannot check for recursive template inclusion (while 1.34 do that) or macro call, this stuff will be fixed as soon as possible.

Browse Bugs

RSS Feeds [ ^ ]
Contacting the author [ ^ ]
If you find a problem with this program or you would like to make a suggestion, or whatever, feel free to e-mail me at
Thanks! [ ^ ]
My thanks go to the following people for submitting feedback and/or code. Apologies to anyone I have forgotten (send me an e-mail!).

  • Jens Finkhäuser, for reporting a subtle bug in output file name generation in wpp-
  • Adam Byrtek for mantaining Debian packages of WPP and other suggestions.
  • Kai Duebbert who sent a patch for wpp-2.13 allowing XHTML compliant output.
  • Bastian who reported a unwanted \D escape in \$\Date\$ in wpp-2.13 with perl 5.6.0.
  • Mikko Apo who requested the output of SYSTEM postprocessable in wpp 2.13.
  • Martin Fischer, who reported a couple of serious bugs in wpp 2.11.
  • Bastian Kleineidam, who made a patch for implementing the SYSTEM built-in macro for wpp-2.11.
  • Petr Prazak, who made some new features for wpp-2.11 (DATE_FORMAT, FILE_SIZE, FILE_DATE) and fixed some bugs.
  • Jiri Rubes, who reported and fixed a problem with wpp 2.09 running in some environments that don't set PWD.
  • Roberto Flora, who used WPP for the web site Ordine Agronomi e Forestali di Bergamo.
  • Stefano Strada (Harlock).
  • Andreas Forsgren said: "WPP is *great* *great* *great*, I love it! Thank *you* for making it." ... then requested an enhancement for the @IF@ ;)
  • Matt Massie, another who catched the <PRE> bug of wpp 2.00 - 2.01.
  • Michelangelo Grigni for some interesting suggestions.
  • Colin Turnbull (CT), let me notice that removing empty lines is bad behaviour for <PRE> formatted stuff. He also asked for macro expansion into variables assigments and macro arguments ... done! ;)
  • Bastian Kleineidam, who discovered and fixed a missing tail inclusion bug. ;)
  • Matteo Flora (Last Knight), he discovered that VIM (VI iMproved) + WPP can be better than MS FrontPad and that the trashcan may be the best place for the last one. ;P
  • Jean-Pierre Malisse, who sent me some suggestions that pushed me in writing the multi line macros feature of WPP ;)
  • Matteo Sala (Ares).
  • Fancesco Chemolli (Kinkie).
  • Luca Sironi (Luca_).
^ Top < Previous     Next >