Home / Alt manpages / perlamiga(1)

  • perlamiga(1)
  • User command
  • linux

Install and Run the Perl 5.22.1 AmigaOS Port Safely

You will finish with a working Perl 5.22.1 installation on AmigaOS 4.1, a reliable way to launch scripts through abc-shell, and a short checklist for avoiding the port's known compatibility traps. The local reference is the perlamiga(1) manpage shipped by perl-doc 5.38.2-3.2ubuntu0.6. That package version supplies the documentation here, but the port described by the document is specifically Perl 5.22.1.

Allow about 30 minutes if the SDK and archive are ready. You need AmigaOS 4.1 update 6 with updates applied, newlib.library 53.28 or newer, and preferably the AmigaOS SDK. You also need abc-shell, or another suitable sh port, because Perl expects a Unix-like shell for external commands and environment handling.

1. Check the platform prerequisites

Before unpacking anything, confirm the host matches the port's assumptions. The manpage calls out AmigaOS 4.1 update 6, the updated system libraries, and the SDK. The decisive library requirement is newlib.library version 53.28 or greater.

The exact command for checking a library version depends on the AmigaOS tools installed on your system, so do not substitute a guessed command and treat it as proof. Use the version information provided by your system management tools, then check that sh resolves to abc-shell or another suitable shell.

Checkpoint

Stop here if newlib.library is older than 53.28 or if you have neither the SDK nor a usable sh. Perl may install but fail later when it runs an external command.

2. Install the supplied archive

Obtain the prebuilt archive from os4depot.net and unpack it into a temporary location. RAM: is suitable for this staging area. Then execute the install script supplied by the archive, either from a shell or through its icon.

10.AmigaOS4:> sh
/AmigaOS4> cd RAM:perl-staging
/AmigaOS4> install-script-name

Replace RAM:perl-staging and install-script-name with the paths and filename actually present in the archive. The important boundary is that the provided installer performs the installation. The manpage explicitly says not to install this port by hand: doing so can duplicate binaries and break the links that the installer preserves.

Once the installer reports completion, remove the temporary archive only after you are satisfied that Perl starts. That deletion is optional and is the only cleanup in this guide. If the installation fails, keep the staging files so you can inspect the installer output and rerun it after correcting the prerequisite.

3. Decide how to handle older Perl ports

This is a fresh port and is not compatible with the earlier Perl 5.8 or 5.16.3 ports. Third-party modules installed for those versions need to be reinstalled or rebuilt for Perl 5.22.1.

If you need both versions, rename the older executable before installing the new one, for example:

Rename SDK:Local/C/perl SDK:Local/C/perl516
Rename SDK:Local/C/perl58 SDK:Local/C/perl58

Use the actual executable paths on your system. Do not rename a file merely because it has a familiar name: inspect the installation first and preserve a copy or backup if the old interpreter is still needed. Renaming an executable changes how scripts find it, so update any local launchers that referred to the old name.

Checkpoint

Keep separate module trees for separate Perl ports. A module that worked with Perl 5.16.3 is not evidence that its binary or ABI will work with 5.22.1.

4. Launch a script through abc-shell

For the best results, start Perl from abc-shell, not directly from the AmigaOS shell. abc-shell supplies file globbing, pattern expansion and the environment variables that Perl expects.

10.AmigaOS4:> sh
/AmigaOS4> perl path:to/myprog arg1 arg2 arg3

Replace path:to/myprog and the arguments with your script. The manpage's example uses an Amiga-style path for the program. Relative paths still follow the port's Unix-style rules, while File::Spec recognises Amiga-style absolute paths.

A script can also use a #! line so abc-shell launches it directly. The documented form is:

#!SDK:Local/C/perl

AmigaOS requires the script bit to be set for this to work. Test it from abc-shell with the script name and its arguments:

10.AmigaOS4:> sh
/AmigaOS4> myprog arg1 arg2 arg3

If direct execution fails, first check the script bit and the interpreter path, then invoke the same file explicitly with perl. That separates a launcher problem from a Perl problem.

5. Account for the known limitations

Older abc-shell versions can crash nested piped programs. The manpage identifies abc-shell 53.2 as affected and recommends installing a later version when available. Avoid diagnosing an application as broken until you have reproduced the pipeline with a current shell.

newlib.library 53.30 and earlier also mishandles some backslash escapes, including \", \n and \t. Unexpected argument text may therefore be a library compatibility issue rather than a quoting error in the Perl program. Check the library version before adding layers of escaping.

Finally, a Perl subprocess created with open FH, "command |" uses a minimal popen() routine. Its process ID cannot be used with waitpid. Design code that uses this form without relying on that PID, or choose a different process strategy when you need normal child-process control.

6. Verify the installation and finish cleanly

Use the installed documentation lookup from abc-shell to confirm that the port's own documentation is available:

10.AmigaOS4:> sh
/AmigaOS4> perldoc perlamiga

You are done when all of these statements are true:

  • newlib.library is at least version 53.28 and the required AmigaOS updates are installed.
  • Perl was installed with the supplied installer, not by copying files by hand.
  • Your test script runs through abc-shell, with its arguments received as intended.
  • Older Perl ports and their modules remain clearly separated, or have been deliberately retired.
  • You have checked abc-shell and newlib versions before relying on nested pipelines or backslash-heavy arguments.