NAME

Apache::VimColor - Apache mod_perl PerlHandler for syntax highlighting in HTML.

SYNOPSIS

This module requires mod_perl2 (see http://perl.apache.org/) and Text::VimColor.

The apache configuration neccessary might look a bit like this:

# in httpd.conf (or any other apache configuration file)
<Location /source>
  SetHandler		perl-script
  PerlHandler		Apache::VimColor

  # Below here is optional
  PerlSetVar  AllowDownload  "True"
  PerlSetVar  TabSize        8
  PerlSetVar  StyleSheet     "http://domain.com/stylesheet.css"
</Location>

DESCRIPTION

This apache handler converts text files in syntax highlighted HTML output using Text::VimColor. If allowed by the configuration the visitor can also download the text-file in it's original form.

CONFIGURATION DIRECTIVES

All features of the this PerlHandler can be set in the apache configuration using the PerlSetVar directive. For example:

    PerlSetVar	AllowDownload	true	# inside <Files>, <Location>, ...
					# apache directives
AllowDownload

Setting this option to true will allow plaintext downloads of the files. A link will be included in the output.

TabStop

Sets the width of one tab symbol. The default is eight spaces.

StyleSheet

If you want to include a custom stylesheet you can set this option. The string will be included in the html-output as-is, you will have to take care of relative filenames yourself.

All highlighted text is withing a span-tag with one of the following classes:

Comment
Constant
Error
Identifier
PreProc
Special
Statement
Todo
Type
Underlined

SEE ALSO

perl(1), mod_perl(3), Apache(3), Text::VimColor

AUTHOR

Florian octo Forster
octo(at)verplant.org
http://verplant.org/

COPYRIGHT

Copyright (c) 2005 Florian Forster.

All rights reserved. This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself.