This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE User-definable POD handling =head1 VERSION Maintainer: Simon Cozens <[EMAIL PROTECTED]> Date: 25 Sep 2000 Mailing List: [EMAIL PROTECTED] Number: 306 Version: 1 Status: Developing =head1 ABSTRACT Make POD extensible by the new C<=handle>, C<=ignore> and C<=define> commands. =head1 DESCRIPTION One criticism of POD is that it's too restrictive. Three new pragmatic commands will make it arbitrarily user extensible. =over 1 =item =handle X as Y [for Z] Imagine, if you will, that POD formatters define routines. The C<=handle> command maps pieces of POD to routines. For instance, if you're writing a book and you want the C<ZE<gt>E<lt>> command to insert an index entry, you'd say something like: =handle Z<> as index Of course, not all POD formatters should translate it like that. If they don't provide the C<index> routine, then they should silently ignore the command. Alternatively, you may map the command to a routine when a certain formatter is run like this: =handle Z<> as index for tex The "X" part of the above syntax may also be an equals-command, which could be used to pass physical markup information to the formatter: =handle =head1 as chapter for tex You might want to take this to extremes, and pass parameters to the routine. I don't like this, though: =handle =head1 as h1 for HTML with font_size => 20, font => courier =item =ignore X [for Y] Tells the parser that certain POD constructs should not be processed by certain formatters: =ignore L<> for text =item =define X [for Y] Introduces a new construct to be mapped to a routine with C<=handle>. This allows the parser to verify arbitrary extensions to POD. =define =head3 =handle =head3 as h3 for HTML =handle =head3 as subsubsection for tex =back =head1 IMPLEMENTATION C<POD::Parser> will need to be extended to support these three commands; text which is found in a C<=handle>d area should be passed to a routine in the formatter if one exists or passed through if one does not. =head1 REFERENCES None