.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "PERLSYMBIAN 1" .TH PERLSYMBIAN 1 "2021-09-24" "perl v5.32.1" "Perl Programmers Reference Guide" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" perlsymbian \- Perl version 5 on Symbian OS .SH "DESCRIPTION" .IX Header "DESCRIPTION" This document describes various features of the Symbian operating system that will affect how Perl version 5 (hereafter just Perl) is compiled and/or runs. .PP \&\fB\s-1NOTE:\s0 this port (as of 0.4.1) does not compile into a Symbian \&\s-1OS GUI\s0 application, but instead it results in a Symbian \s-1DLL.\s0\fR The \s-1DLL\s0 includes a \*(C+ class called CPerlBase, which one can then (derive from and) use to embed Perl into applications, see \fIsymbian/README\fR. .PP The base port of Perl to Symbian only implements the basic POSIX-like functionality; it does not implement any further Symbian or Series 60, Series 80, or \s-1UIQ\s0 bindings for Perl. .PP It is also possible to generate Symbian executables for \*(L"miniperl\*(R" and \*(L"perl\*(R", but since there is no standard command line interface for Symbian (nor full keyboards in the devices), these are useful mainly as demonstrations. .SS "Compiling Perl on Symbian" .IX Subsection "Compiling Perl on Symbian" (0) You need to have the appropriate Symbian \s-1SDK\s0 installed. .PP These instructions have been tested under various Nokia Series 60 Symbian SDKs (1.2 to 2.6, 2.8 should also work, 1.2 compiles but does not work), Series 80 2.0, and Nokia 7710 (Series 90) \s-1SDK.\s0 You can get the SDKs from Forum Nokia (). A very rough port (\*(L"it compiles\*(R") to \s-1UIQ 2.1\s0 has also been made. .PP A prerequisite for any of the SDKs is to install ActivePerl from ActiveState, .PP Having the \s-1SDK\s0 installed also means that you need to have either the Metrowerks CodeWarrior installed (2.8 and 3.0 were used in testing) or the Microsoft Visual \*(C+ 6.0 installed (\s-1SP3\s0 minimum, \s-1SP5\s0 recommended). .PP Note that for example the Series 60 2.0 \s-1VC SDK\s0 installation talks about ActivePerl build 518, which does no more (as of mid\-2005) exist at the ActiveState website. The ActivePerl 5.8.4 build 810 was used successfully for compiling Perl on Symbian. The 5.6.x ActivePerls do not work. .PP Other SDKs or compilers like Visual.NET, command-line-only Visual.NET, Borland, GnuPoc, or sdk2unix have not been tried. .PP These instructions almost certainly won't work with older Symbian releases or other SDKs. Patches to get this port running in other releases, SDKs, compilers, platforms, or devices are naturally welcome. .PP (1) Get a Perl source code distribution (for example the file perl\-5.9.2.tar.gz is fine) from and unpack it in your the C:/Symbian directory of your Windows system. .PP (2) Change to the perl source directory. .PP .Vb 1 \& cd c:\eSymbian\eperl\-5.x.x .Ve .PP (3) Run the following script using the perl coming with the \s-1SDK\s0 .PP .Vb 1 \& perl symbian\econfig.pl .Ve .PP You must use the cmd.exe, the Cygwin shell will not work. The \s-1PATH\s0 must include the \s-1SDK\s0 tools, including a Perl, which should be the case under cmd.exe. If you do not have that, see the end of symbian\esdk.pl for notes of how your environment should be set up for Symbian compiles. .PP (4) Build the project, either by .PP .Vb 1 \& make all .Ve .PP in cmd.exe or by using either the Metrowerks CodeWarrior or the Visual \*(C+ 6.0, or the Visual Studio 8 (the Visual \*(C+ 2005 Express Edition works fine). .PP If you use the \s-1VC IDE,\s0 you will have to run \fIsymbian\econfig.pl\fR first using the cmd.exe, and then run 'make win.mf vc6.mf' to generate the \s-1VC6\s0 makefiles and workspaces. \*(L"make vc6\*(R" will compile for the \s-1VC6,\s0 and \*(L"make cw\*(R" for the CodeWarrior. .PP The following \s-1SDK\s0 and compiler configurations and Nokia phones were tested at some point in time (+ = compiled and PerlApp run, \- = not), both for Perl 5.8.x and 5.9.x: .PP .Vb 10 \& SDK | VC | CW | \& \-\-\-\-\-\-\-\-+\-\-\-\-+\-\-\-\-+\-\-\- \& S60 1.2 | + | + | 3650 (*) \& S60 2.0 | + | + | 6600 \& S60 2.1 | \- | + | 6670 \& S60 2.6 | + | + | 6630 \& S60 2.8 | + | + | (not tested in a device) \& S80 2.6 | \- | + | 9300 \& S90 1.1 | + | \- | 7710 \& UIQ 2.1 | \- | + | (not tested in a device) \& \& (*) Compiles but does not work, unfortunately, a problem with Symbian. .Ve .PP If you are using the 'make' directly, it is the \s-1GNU\s0 make from the SDKs, and it will invoke the right make commands for the Windows emulator build and the Arm target builds ('thumb' by default) as necessary. .PP The build scripts assume the 'absolute style' \s-1SDK\s0 installs under C:, the 'subst style' will not work. .PP If using the \s-1VC IDE,\s0 to build use for example the File\->Open Workspace\-> C:\eSymbian\e8.0a\eS60_2nd_FP2\eepoc32\ebuild\esymbian\eperl\eperl\ewins\eperl.dsw The emulator binaries will appear in the same directory. .PP If using the \s-1VC IDE,\s0 you will a lot of warnings in the beginning of the build because a lot of headers mentioned by the source cannot be found, but this is not serious since those headers are not used. .PP The Metrowerks will give a lot of warnings about unused variables and empty declarations, you can ignore those. .PP When the Windows and Arm DLLs are built do not be scared by a very long messages whizzing by: it is the \*(L"export freeze\*(R" phase where the whole (rather large) \s-1API\s0 of Perl is listed. .PP Once the build is completed you need to create the \s-1DLL SIS\s0 file by .PP .Vb 1 \& make perldll.sis .Ve .PP which will create the file perlXYZ.sis (the \s-1XYZ\s0 being the Perl version) which you can then install into your Symbian device: an easy way to do this is to send them via Bluetooth or infrared and just open the messages. .PP Since the total size of all Perl \s-1SIS\s0 files once installed is over 2 \s-1MB,\s0 it is recommended to do the installation into a memory card (drive E:) instead of the C: drive. .PP The size of the perlXYZ.SIS is about 370 kB but once it is in the device it is about one 750 kB (according to the application manager). .PP The perlXYZ.sis includes only the Perl \s-1DLL:\s0 to create an additional \&\s-1SIS\s0 file which includes some of the standard (pure) Perl libraries, issue the command .PP .Vb 1 \& make perllib.sis .Ve .PP Some of the standard Perl libraries are included, but not all: see \*(L"\s-1HISTORY\*(R"\s0 or \fIsymbian\einstall.cfg\fR for more details (250 kB \-> 700 kB). .PP Some of the standard Perl \s-1XS\s0 extensions (see \*(L"\s-1HISTORY\*(R"\s0 are also available: .PP .Vb 1 \& make perlext.sis .Ve .PP which will create perlXYZext.sis (290 kB \-> 770 kB). .PP To compile the demonstration application PerlApp you need first to install the Perl headers under the \s-1SDK.\s0 .PP To install the Perl headers and the class CPerlBase documentation so that you no more need the Perl sources around to compile Perl applications using the \s-1SDK:\s0 .PP .Vb 1 \& make sdkinstall .Ve .PP The destination directory is C:\eSymbian\eperl\eX.Y.Z. For more details, see \fIsymbian\ePerlBase.pod\fR. .PP Once the headers have been installed, you can create a \s-1SIS\s0 for the PerlApp: .PP .Vb 1 \& make perlapp.sis .Ve .PP The perlapp.sis (11 kB \-> 16 kB) will be built in the symbian subdirectory, but a copy will also be made to the main directory. .PP If you want to package the Perl DLLs (one for \s-1WINS,\s0 one for \s-1ARMI\s0), the headers, and the documentation: .PP .Vb 1 \& make perlsdk.zip .Ve .PP which will create perlXYZsdk.zip that can be used in another Windows system with the \s-1SDK,\s0 without having to compile Perl in that system. .PP If you want to package the PerlApp sources: .PP .Vb 1 \& make perlapp.zip .Ve .PP If you want to package the perl.exe and miniperl.exe, you can use the perlexe.sis and miniperlexe.sis make targets. You also probably want the perllib.sis for the libraries and maybe even the perlapp.sis for the recognizer. .PP The make target 'allsis' combines all the above \s-1SIS\s0 targets. .PP To clean up after compilation you can use either of .PP .Vb 2 \& make clean \& make distclean .Ve .PP depending on how clean you want to be. .SS "Compilation problems" .IX Subsection "Compilation problems" If you see right after \*(L"make\*(R" this .PP .Vb 3 \& cat makefile.sh >makefile \& \*(Aqcat\*(Aq is not recognized as an internal or external command, \& operable program or batch file. .Ve .PP it means you need to (re)run the \fIsymbian\econfig.pl\fR. .PP If you get the error .PP .Vb 2 \& \*(Aqperl\*(Aq is not recognized as an internal or external command, \& operable program or batch file. .Ve .PP you may need to reinstall the ActivePerl. .PP If you see this .PP .Vb 3 \& ren makedef.pl nomakedef.pl \& The system cannot find the file specified. \& C:\eSymbian\e...\emake.exe: [rename_makedef] Error 1 (ignored) .Ve .PP please ignore it since it is nothing serious (the build process of renames the Perl makedef.pl as nomakedef.pl to avoid confusing it with a makedef.pl of the \s-1SDK\s0). .SS "PerlApp" .IX Subsection "PerlApp" The PerlApp application demonstrates how to embed Perl interpreters to a Symbian application. The \*(L"Time\*(R" menu item runs the following Perl code: \f(CW\*(C`print "Running in ", $^O, "\en", scalar localtime\*(C'\fR, the \*(L"Oneliner\*(R" allows one to type in Perl code, and the \*(L"Run\*(R" opens a file chooser for selecting a Perl file to run. .PP The PerlApp also is started when the \*(L"Perl recognizer\*(R" (also included and installed) detects a Perl file being activated through the \s-1GUI,\s0 and offers either to install it under \ePerl (if the Perl file is in the inbox of the messaging application) or to run it (if the Perl file is under \ePerl). .SS "sisify.pl" .IX Subsection "sisify.pl" In the symbian subdirectory there is \fIsisify.pl\fR utility which can be used to package Perl scripts and/or Perl library directories into \s-1SIS\s0 files, which can be installed to the device. To run the sisify.pl utility, you will need to have the 'makesis' and 'uidcrc' utilities already installed. If you don't have the Win32 SDKs, you may try for example or . .SS "Using Perl in Symbian" .IX Subsection "Using Perl in Symbian" First of all note that you have full access to the Symbian device when using Perl: you can do a lot of damage to your device (like removing system files) unless you are careful. Please do take backups before doing anything. .PP The Perl port has been done for the most part using the Symbian standard POSIX-ish \s-1STDLIB\s0 library. It is a reasonably complete library, but certain corners of such emulation libraries that tend to be left unimplemented on non-UNIX platforms have been left unimplemented also this time: \fBfork()\fR, \fBsignals()\fR, user/group ids, \&\fBselect()\fR working for sockets, non-blocking sockets, and so forth. See the file \fIsymbian/config.sh\fR and look for 'undef' to find the unsupported APIs (or from Perl use Config). .PP The filesystem of Symbian devices uses DOSish syntax, \*(L"drives\*(R" separated from paths by a colon, and backslashes for the path. The exact assignment of the drives probably varies between platforms, but for example in Series 60 you might see C: as the (flash) main memory, D: as the \s-1RAM\s0 drive, E: as the memory card (\s-1MMC\s0), Z: as the \s-1ROM.\s0 In Series 80 D: is the memory card. As far the devices go the \s-1NUL:\s0 is the bit bucket, the COMx: are the serial lines, IRCOMx: are the \s-1IR\s0 ports, \s-1TMP:\s0 might be C:\eSystem\eTemp. Remember to double those backslashes in doublequoted strings. .PP The Perl \s-1DLL\s0 is installed in \eSystem\eLibs\e. The Perl libraries and extension DLLs are installed in \eSystem\eLibs\ePerl\eX.Y.Z\e. The PerlApp is installed in \eSystem\eApps\e, and the \s-1SIS\s0 also installs a couple of demo scripts in \ePerl\e (C:\eMydocs\ePerl\e on Nokia 7710). .PP Note that the Symbian filesystem is very picky: it strongly prefers the \e instead of the /. .PP When doing \s-1XS /\s0 Symbian \*(C+ programming include first the Symbian headers, then any standard C/POSIX headers, then Perl headers, and finally any application headers. .PP \&\fBNew()\fR and \fBCopy()\fR are unfortunately used by both Symbian and Perl code so you'll have to play cpp games if you need them. PerlBase.h undefines the Perl definitions and redefines them as \fBPerlNew()\fR and \fBPerlCopy()\fR. .SH "TO DO" .IX Header "TO DO" Lots. See \fIsymbian/TODO\fR. .SH "WARNING" .IX Header "WARNING" As of Perl Symbian port version 0.4.1 any part of Perl's standard regression test suite has not been run on a real Symbian device using the ported Perl, so innumerable bugs may lie in wait. Therefore there is absolutely no warranty. .SH "NOTE" .IX Header "NOTE" When creating and extending application programming interfaces (APIs) for Symbian or Series 60 or Series 80 or Series 90 it is suggested that trademarks, registered trademarks, or trade names are not used in the \s-1API\s0 names. Instead, developers should consider basing the \s-1API\s0 naming in the existing (\*(C+, or maybe Java) public component and \s-1API\s0 naming, modified as appropriate by the rules of the programming language the new APIs are for. .PP Nokia is a registered trademark of Nokia Corporation. Nokia's product names are trademarks or registered trademarks of Nokia. Other product and company names mentioned herein may be trademarks or trade names of their respective owners. .SH "AUTHOR" .IX Header "AUTHOR" Jarkko Hietaniemi .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 2004\-2005 Nokia. All rights reserved. .PP Copyright (c) 2006\-2007 Jarkko Hietaniemi. .SH "LICENSE" .IX Header "LICENSE" The Symbian port is licensed under the same terms as Perl itself. .SH "HISTORY" .IX Header "HISTORY" .IP "\(bu" 4 0.1.0: April 2005 .Sp (This will show as \*(L"0.01\*(R" in the Symbian Installer.) .Sp .Vb 10 \& \- The console window is a very simple console indeed: one can \& get the newline with "000" and the "C" button is a backspace. \& Do not expect a terminal capable of vt100 or ANSI sequences. \& The console is also "ASCII", you cannot input e.g. any accented \& letters. Because of obvious physical constraints the console is \& also very small: (in Nokia 6600) 22 columns, 17 rows. \& \- The following libraries are available: \& AnyDBM_File AutoLoader base Carp Config Cwd constant \& DynaLoader Exporter File::Spec integer lib strict Symbol \& vars warnings XSLoader \& \- The following extensions are available: \& attributes Compress::Zlib Cwd Data::Dumper Devel::Peek \& Digest::MD5 DynaLoader Fcntl File::Glob Filter::Util::Call \& IO List::Util MIME::Base64 \& PerlIO::scalar PerlIO::via SDBM_File Socket Storable Time::HiRes \& \- The following extensions are missing for various technical \& reasons: \& B ByteLoader Devel::DProf Devel::PPPort Encode GDBM_File \& IPC::SysV NDBM_File Opcode PerlIO::encoding POSIX \& re Safe Sys::Hostname Sys::Syslog \& threads threads::shared Unicode::Normalize \& \- Using MakeMaker or the Module::* to build and install modules \& is not supported. \& \- Building XS other than the ones in the core is not supported. .Ve .Sp Since this is 0.something release, any future releases are almost guaranteed to be binary incompatible. As a sign of this the Symbian symbol exports are kept unfrozen and the .def files fully rebuilt every time. .IP "\(bu" 4 0.2.0: October 2005 .Sp .Vb 3 \& \- Perl 5.9.3 (patch level 25741) \& \- Compress::Zlib and IO::Zlib supported \& \- sisify.pl added .Ve .Sp We maintain the binary incompatibility. .IP "\(bu" 4 0.3.0: October 2005 .Sp .Vb 2 \& \- Perl 5.9.3 (patch level 25911) \& \- Series 80 2.0 and UIQ 2.1 support .Ve .Sp We maintain the binary incompatibility. .IP "\(bu" 4 0.4.0: November 2005 .Sp .Vb 2 \& \- Perl 5.9.3 (patch level 26052) \& \- adding a sample Symbian extension .Ve .Sp We maintain the binary incompatibility. .IP "\(bu" 4 0.4.1: December 2006 .Sp .Vb 4 \& \- Perl 5.9.5\-to\-be (patch level 30002) \& \- added extensions: Compress/Raw/Zlib, Digest/SHA, \& Hash/Util, Math/BigInt/FastCalc, Text/Soundex, Time/Piece \& \- port to S90 1.1 by alexander smishlajev .Ve .Sp We maintain the binary incompatibility. .IP "\(bu" 4 0.4.2: March 2007 .Sp .Vb 4 \& \- catchup with Perl 5.9.5\-to\-be (patch level 30812) \& \- tested to build with Microsoft Visual C++ 2005 Express Edition \& (which uses Microsoft Visual C 8, instead of the old VC6), \& SDK used for testing S60_2nd_FP3 aka 8.1a .Ve .Sp We maintain the binary incompatibility.