I wrote a static-site generator, and I wanted to be able to allow users to deploy new instances easily.
To do that I wrote some code that parses a __DATA__ block for lines like:
mkdir foo create_file foo/bar.txt <<EOF .. This is the file content .. EOF mkdir bar ..
The process was very simple and allowed me to bundle up the "master template" files in one simple to understand resource.
[1] - https://github.com/skx/templer [2] - https://raw.github.com/skx/templer/master/lib/Templer/Site/N...