t/examples/pod.t - Compile examples found in POD
# test all files % prove t/examples/pod.t # test specific files % perl t/examples/pod.t docs/compiler_faq.pod
Tests the syntax for any embedded PIR in POD, for all files in the repository that contain POD. Any invalid examples are reported in the test output.
To test a snippet of parrot code, wrap it in =begin and =end blocks like:
=begin
=end
=begin PASM set I0, 0 =end PASM
PASM and PIR are both valid target languages.
PASM
PIR
Additionally, you can add the following modifiers (prepending with an underscore).
FRAGMENT
For PIR, wraps the code in a .sub block.
.sub
TODO
INVALID
Either of these will force the test to be marked TODO.
For example, this PIR fragment uses an old, invalid opcode and needs to be updated:
=begin PIR_FRAGMENT_INVALID find_type $I1, 'Integer' =end PIR_FRAGMENT_INVALID
As shown, you can "stack" the modifiers. Take care to make the begin and and end POD targets identical. Always begin with the target language.
To install Rakudo::Star, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Rakudo::Star
CPAN shell
perl -MCPAN -e shell install Rakudo::Star
For more information on module installation, please visit the detailed CPAN module installation guide.