agentleFS
gerphgerph/riscos-agent-skills/skills/using-perl/SKILL.md

using-perl

Skill4 starsChanged 8 months agoMITView on GitHub

Write, review, and debug Perl for the RISC OS build environment, especially scripts that must run under the RISC OS Perl 5.001 interpreter rather than only under a modern host Perl. Use when changing `.pl` or `.pm` files, diagnosing RISC OS Perl parser/runtime failures, or checking whether a Perl construct is too new for the target interpreter.

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 5 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Check the target version with riscos-build-run --command 'perl -v' if compatibility matters.

    line 13
  2. Distinctive:

    Read references/perl-5.001-checklist.md before editing code that will run on RISC OS.

    line 14
  3. Distinctive:

    Prefer old-Perl-safe constructs while editing.

    line 15
  4. Distinctive:

    Treat Perl 5.001 compatibility as a requirement for RISC OS-executed scripts.

    line 20
  5. Very specific:

    Prefer 2-argument open with bareword filehandles over newer open(...) forms.

    line 21
  6. Very specific:

    Use binmode(FILEHANDLE) for binary I/O.

    line 22
  7. Very specific:

    Avoid lexical filehandles such as my $fh.

    line 23
  8. Very specific:

    Always pass an explicit mode to mkdir, such as 0755.

    line 24
  9. Distinctive:

    Do not assume host Perl success proves RISC OS Perl compatibility.

    line 25
  10. Very specific:

    When a script is meant to run on RISC OS, validate it there with the script and any required resource directories included in the …

    line 29
  11. Very specific:

    Do not run more than 2 riscos-build-run jobs concurrently.

    line 31
  12. Distinctive:

    If a failure appears only on RISC OS, add or update guidance in this skill when the lesson is generic rather than repository-specific.

    line 38

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. Check the target version with riscos-build-run --command 'perl -v' if compatibility matters.
  2. Read references/perl-5.001-checklist.md before editing code that will run on RISC OS.
  3. Prefer old-Perl-safe constructs while editing.
  4. 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 open with bareword filehandles over newer open(...) forms.
  • Use binmode(FILEHANDLE) for binary I/O. Do not use :raw.
  • Avoid lexical filehandles such as my $fh; use classic filehandles like IN, OUT, FH.
  • Always pass an explicit mode to mkdir, such as 0755.
  • 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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.