Jump to content

Documentation: Difference between revisions

→‎{{header|Perl 6}}: Add more info. Also Perl 6 -> Raku.
(→‎{{header|Perl 6}}: Add more info. Also Perl 6 -> Raku.)
Line 1,032:
 
=={{header|Perl 6}}==
Similarly to Perl 5, Perl 6Raku is documented using [httphttps://perlcabaldocs.raku.org/synlanguage/S26.htmlpod Pod] (a redesigned version of POD). However, it's not simply ignored by the parser as in Perl 5, it's an internal part of the language spec and can be used to attach documentation objects to almost any part of the code.
 
<lang perl6>#= it's yellow
#= it's yellow
sub marine { ... }
say &marine.WHY; # "it's yellow"
Line 1,046 ⟶ 1,047:
say Sheep.^find_method('roar').WHY; # "not too scary"</lang>
 
A compiler has a built-in <code>--doc</code> switch that will generate documentation from a given source file. An output format can be specified in the switch. For example, <code>--doc=Markdown</code> will generate Markdown from Pod provided that the <code>Pod::To::Markdown</code> is installed.
 
=={{header|Phix}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.