Using Perl
Assume the target interpreter is the RISC OS Perl shipped in the build environment unless the task clearly says otherwise. Validate against that interpreter, not just the host Perl.
Quick workflow
- Check the target version with
riscos-build-run --command 'perl -v'if compatibility matters. - Read references/perl-5.001-checklist.md before editing code that will run on RISC OS.
- Prefer old-Perl-safe constructs while editing.
- Syntax-check on the host if useful, but always confirm the final behaviour under
riscos-build-run.
Default rules
- Treat Perl 5.001 compatibility as a requirement for RISC OS-executed scripts.
- Prefer 2-argument
openwith bareword filehandles over neweropen(...)forms. - Use
binmode(FILEHANDLE)for binary I/O. Do not use:raw. - Avoid lexical filehandles such as
my $fh; use classic filehandles likeIN,OUT,FH. - Always pass an explicit mode to
mkdir, such as0755. - Do not assume host Perl success proves RISC OS Perl compatibility.
Validation
When a script is meant to run on RISC OS, validate it there with the script and any required resource directories included in the riscos-build-run file list.
Do not run more than 2 riscos-build-run jobs concurrently. The build server may struggle with higher concurrency and produce misleading infrastructure failures.
Typical checks:
riscos-build-run --command 'perl -v'riscos-build-run script.pl support-dir --command 'Perl script.pl ...'
If a failure appears only on RISC OS, add or update guidance in this skill when the lesson is generic rather than repository-specific.