Author: cd@conference.org
Description: PerlPointCD Demo

Check: HTML validity, CSS validity, links.

Start / Lightning Talks / Jochen Stenzel Next: Index Previous: Highlight examples TOC

# Import filters can be added

Besides PerlPoint, each source file can be provided in POD as well. This feature is enabled by a PerlPoint input filter, which can be compared to the import filters of usual applications.

But this feature is not limited to POD - in fact, any input format can be supported by user defined import filters. A PerlPointCD import filter for a certain format is a Perl file named `ifilter.<format>` in an import filter directory, defining a filter function `<format>2pp()`.

Please note that formats are recognized by file extensions, so the extension of a filter source file and the extensions of sources in the corresponding format need to be equal.

      ifilter.pod defines a filter
      pod2pp for *.pod files.

      ifilter.wiKi defines a filter
      wiKi2pp for *.wiKi files,
      not *.wiki files.

Writing a filter is easy: a filter function gets the source lines in an array `@main::_ifilterText` and supplies a PerlPoint string. See the distributed POD filter for an example.

The filter directory is set up by a makefile macro `IMPORTFILTERDIR`. A second macro, `IMPORTORDER`, specifies the search order for alternative formats.

      # set up import filters
      IMPORTFILTERDIR=PerlPointCD/ifilters
      IMPORTORDER=pod twiki kwiki

Index-related:

- Configure the make call

Next: Index Previous: Highlight examples TOC Start / Lightning Talks / Jochen Stenzel