Name
wdcompile - parse and compile WebDyne pages
Synopsis
wdcompile [OPTIONS] FILE
Options
-h, --help Show brief help message.
- -0
-
Stop and display internal data structure after parsing withHTML::TreeBuilder. This stage shows the HTML syntax tree generated from the source file.
- -1
-
Stop and display internal data structure after first stage of optimisation. In this stage any parts of the HTML tree that do not contain child tags that generate dynamic output are pre-rendered back into HTML
- -2
-
Stop and display internal data structure after second stage of optimisation. In this stage blocks that do generate dynamic code are analysed for child tags that can be pre-rendered back into HTML without affecting the dymamic components of the tree.
- -m, --meta
-
Show any WebDyne meta data found in the source file. WebDyne meta data are hints or instructions contained in the <meta> sections with the name "WebDyne". If found such meta data is removed from the resulting HTML parse tree and stored in a separate data structure. This option will show that data structire if it exists.
Description
The wdcompile command displays the internal data structure used by WebDyne when compiling psp pages.
WebDyne uses the same parsing and compilation routines as wdcompile. After compilation WebDyne optionally stores the resulting data structure to a cache directory using the Perl Storable module to speed up subsequent rendering operations.
If the tree structure does not appear correct when debugging with wdcompile then it will probably not display as expected when rendered with WebDyne. Missing end quotes, closing tags and general HTML syntax problems can all make the parse tree misplace (or omit completely) blocks of HTML/WebDyne code.
By default wdcompile will show the data structure after all parsing and optimisation stages have been completed. You can display various intermediate stages using the options below.
Notes
The wdcompile will not run any code in the __PERL__ section of a psp file. It will also not execute any WebDyne filters that may be called by the source file.
Examples
wdcompile widget.psp
Compile and display the completed internal WebDyne data structure of the file called widget.psp. The resulting output shows the data structure after the file is parsed, the rebuilt around any dynamic WebDyne tags.
wdcompile -0 widget.psp
Parse and display the very data structure of the widget.psp file at the lowest level - as interpreted by the HTML::Treebuilder module, with no optimisation at all.
Author
Written by Andrew Speer, andrew@webdyne.org
Copying
Copyright (C) 2008-2010 Andrew Speer. Free use of this software is granted under the terms of the GNU General Public License (GPL)