Next: Embedded code   Previous: Including Perl   Contents: Contents

Including Examples

Included files can be declared to be examples. This makes the file placed into the source as a verbatim block, without need to copy its contents into the source.


  // include an external script as an example
  \INCLUDE{type=example file=script}

So, an example script of


  #!perl -w

  print "Geetings from outside!\n";

is made part of the source as if one would have written


  <<EOE
  #!perl -w

  print "Greetings from outside!\n";
  EOE

All lines of the example file are included unchanged. On request, they can be indented. To do so, just set the special option "indent" to a positive numerical value equal to the number of spaces to be inserted before each line.


  // external example source, indented by 3 spaces
  \INCLUDE{type=example file=script indent=3}

Including external scripts can accelerate PerlPoint authoring significantly, especially if the included files are still subject to changes.

Next: Embedded code   Previous: Including Perl   Contents: Contents