modules/pod/ansi.zzm

pod-parser-0.0.1 documentation

Package

Name
pod-parser
Version
0.0.1
Uploaded
2026-05-28 11:45:33
Dependencies
Metadata
zuzu-distribution.json
Archive
Download .tar.gz

NAME

pod/ansi - Render parsed POD documents as ANSI terminal text.

SYNOPSIS

  from pod/parser import parse_pod;
  from pod/ansi import PodANSI;

  let doc := parse_pod("=head1 NAME\n\nExample\n\n=cut\n");
  say( ( new PodANSI() ).render(doc) );

DESCRIPTION

This pure-Zuzu module renders pod/parser PodDocument objects to ANSI-styled terminal text. Headings are bright bold white, B<...> is bold, I<...> is underlined, C<...> and verbatim blocks are cyan, and L<...> links are yellow.

Text paragraphs and list items are wrapped to width, which defaults to 80 columns.

EXPORTED CLASSES

  • PodANSI

    Renderer class with render and render_node methods.

COPYRIGHT AND LICENCE

pod/ansi is copyright Toby Inkster.

It is free software; you may redistribute it and/or modify it under the terms of either the Artistic License 1.0 or the GNU General Public License version 2.