1# vim: syntax=pod 2 3If you read this file _as_is_, just ignore the funny characters you 4see. It is written in the POD format (see perlpod manpage) which is 5specially designed to be readable as is. 6 7=head1 NAME 8 9perlamiga - Perl under AmigaOS 4.1 10 11=head1 NOTE 12 13This is a port of Perl 5.22.1, it is a fresh port and not in any way 14compatible with my previous ports of Perl 5.8 and 5.16.3. This means 15you will need to reinstall / rebuild any third party modules you have 16installed. 17 18newlib.library version 53.28 or greater is required. 19 20=head1 SYNOPSIS 21 22Once perl is installed you can read this document in the following way 23 24 sh -c "perldoc perlamiga" 25 26or you may read I<as is>: either as F<README.amiga>, or F<pod/perlamiga.pod>. 27 28=cut 29 30 NAME 31 SYNOPSIS 32 DESCRIPTION 33 - Prerequisites 34 - Starting Perl programs under AmigaOS 35 - Shortcomings of Perl under AmigaOS 36 INSTALLATION 37 CHANGES 38 39=head1 DESCRIPTION 40 41=head2 Prerequisites for running Perl 5.22.1 under AmigaOS 4.1 42 43=over 6 44 45=item B<AmigaOS 4.1 update 6 with all updates applied as of 9th October 2013> 46 47The most important of which is: 48 49=item B<newlib.library version 53.28 or greater> 50 51=item B<AmigaOS SDK> 52 53Perl installs into the SDK directory structure and expects many of the 54build tools present in the SDK to be available. So for the best results 55install the SDK first. 56 57=item B<abc-shell> 58 59If you do not have the SDK installed you must at least have abc-shell 60installed or some other suitable sh port. This is required to run 61external commands and should be available as 'sh' in your path. 62 63=back 64 65=head2 Starting Perl programs under AmigaOS 4.1 66 67Perl may be run from the AmigaOS shell but for best results should be 68run under abc-shell. (abc-shell handles file globbing, pattern 69expansion, and sets up environment variables in the UN*Xy way that 70Perl expects.) 71 72For example: 73 74 New Shell process 10 75 10.AmigaOS4:> sh 76 /AmigaOS4>perl path:to/myprog arg1 arrg2 arg3 77 78Abc-shell can also launch programs via the #! syntax at the start of 79the program file, it's best use the form #!SDK:Local/C/perl so that 80the AmigaOS shell may also find perl in the same way. AmigaOS requires 81the script bit to be set for this to work 82 83 10.AmigaOS4:> sh 84 /AmigaOS4>myprog arg1 arrg2 arg3 85 86=head2 Limitations of Perl under AmigaOS 4.1 87 88=over 6 89 90=item B<Nested Piped programs can crash when run from older abc-shells> 91 92abc-shell version 53.2 has a bug that can cause crashes in the 93subprocesses used to run piped programs, if a later version is 94available you should install it instead. 95 96=item B<Incorrect or unexpected command line unescaping> 97 98newlib.library 53.30 and earlier incorrectly unescape slashed escape 99sequences e.g. \" \n \t etc requiring unusual extra escaping. 100 101=item B<Starting subprocesses via open has limitations> 102 103 open FH, "command |" 104 105Subprocesses started with open use a minimal popen() routine and 106therefore they do not return pids usable with waitpid etc. 107 108=item If you find any other limitations or bugs then let me know. 109 110Please report bugs in this version of perl to andy@broad.ology.org.uk 111in the first instance. 112 113=back 114 115=head1 INSTALLATION 116 117This guide assumes you have obtained a prebuilt archive from os4depot.net. 118 119Unpack the main archive to a temporary location (RAM: is fine). 120 121Execute the provided install script from shell or via its icon. 122 123You B<must not> attempt to install by hand. 124 125Once installed you may delete the temporary archive. 126 127This approach will preserve links in the installation without creating 128duplicate binaries. 129 130If you have the earlier ports perl 5.16 or 5.8 installed you may like 131to rename your perl executable to perl516 or perl58 or something 132similar before the installation of 5.22.1, this will allow you to use 133both versions at the same time. 134 135=head1 Amiga Specific Modules 136 137=head2 Amiga::ARexx 138 139The Amiga::ARexx module allows you to easily create a perl based ARexx 140host or to send ARexx commands to other programs. 141 142Try C<perldoc Amiga::ARexx> for more info. 143 144=head2 Amiga::Exec 145 146The Amiga::Exec module introduces support for Wait(). 147 148Try C<perldoc Amiga::Exec> for more info. 149 150=head1 BUILDING 151 152To build perl under AmigaOS from the patched sources you will need to 153have a recent version of the SDK. Version 53.29 is recommended, 154earlier versions will probably work too. 155 156With the help of Jarkko Hietaniemi the Configure system has been tweaked to 157run under abc-shell so the recommend build process is as follows. 158 159 stack 2000000 160 sh Configure -de 161 gmake 162 163This will build the default setup that installs under SDK:local/newlib/lib/ 164 165=head1 CHANGES 166 167=over 6 168 169=item B<August 2015> 170 171=over 2 172 173=item Port to Perl 5.22 174 175=item Add handling of NIL: to afstat() 176 177=item Fix inheritance of environment variables by subprocesses. 178 179=item Fix exec, and exit in "forked" subprocesses. 180 181=item Fix issue with newlib's unlink, which could cause infinite loops. 182 183=item Add flock() emulation using IDOS->LockRecord thanks to Tony Cook 184for the suggestion. 185 186=item Fix issue where kill was using the wrong kind of process ID 187 188=back 189 190=item B<27th November 2013> 191 192=over 2 193 194=item Create new installation system based on installperl links 195and Amiga protection bits now set correctly. 196 197=item Pod now defaults to text. 198 199=item File::Spec should now recognise an Amiga style absolute path as well 200as an Unix style one. Relative paths must always be Unix style. 201 202=back 203 204=item B<20th November 2013> 205 206=over 2 207 208=item Configured to use SDK:Local/C/perl to start standard scripts 209 210=item Added Amiga::Exec module with support for Wait() and AmigaOS signal numbers. 211 212=back 213 214=item B<10th October 13> 215 216First release of port to 5.16.3. 217 218=back 219 220=head1 SEE ALSO 221 222You like this port? See L<http://www.broad.ology.org.uk/amiga/> 223for how you can help. 224 225=cut 226