>From perlpodspec:
"=begin formatname"
This marks the following paragraphs (until the matching "=end
formatname") as being for some special kind of processing. Unless
"formatname" begins with a colon, the contained non‐command
paragraphs are data paragraphs. But if "formatname" does begin
with a colon, then non‐command paragraphs are ordinary paragraphs
or data paragraphs. This is discussed in detail in the section
"About Data Paragraphs and "=begin/=end" Regions".
It is advised that formatnames match the regexp
"m/\A:?[−a−zA−Z0−9_]+\z/". Implementors should anticipate future
expansion in the semantics and syntax of the first parameter to
"=begin"/"=end"/"=for".
I'd like to extend this definition a bit. I would replace the second paragraph
with:
"=begin formatname"
"=begin formatname parameter"
This marks the following paragraphs (until the matching "=end
formatname") as being for some special kind of processing. Unless
"formatname" begins with a colon, the contained non‐command
paragraphs are data paragraphs. But if "formatname" does begin
with a colon, then non‐command paragraphs are ordinary paragraphs
or data paragraphs. This is discussed in detail in the section
"About Data Paragraphs and "=begin/=end" Regions".
It is advised that formatnames match the regexp
"m/\A:?[−a−zA−Z0−9_]+\z/". Everything following whitespace after the
formatname is a parameter that may be used by the formatter when dealing
with this region. Implementors should anticipate future
expansion in the semantics and syntax of the first parameter to
"=begin"/"=end"/"=for".
This allows for constructions like:
=begin syntax javascript
=end syntax
...or...
=begin table width(10) height(9)
=end table
...or...
=begin dialect Pod6
=end dialect
I believe several parsers already allow this implicitly.
--
rjbs