in reply to Perl on IBM AS/400?
You might want to consider looking at the alternatives. The Perl port on CPAN listed above is for version 5.005, and it looked to me as though the port was not being supported very well. If you are serious about doing some kind of CGI programming on the AS/400, you might want to look at Brad Stone's BVS Tools site and the book, e-RPG, which although spendy might bring you more success in this endeavor.
Some of the problems I ran into included but are not limited to
- STDIN, STOUT, and STDERR are environmental variables on the AS/400, which interfere with some Perl scripts. This problem is easily solved, if memory serves.
- the fork() call is not supported at all.
- there is no help to be found on the mailing lists because there are only two other people in the world that have succeeded in getting Perl to run on the AS/400, and one of them is the port maintainer, and the other one is you.
- Apparently many AS/400 programmers, after getting burned by IBM during the Java-is-the-Messiah zealotry era, are now reluctant to attempt to use languages not native to the AS/400. Therefore asking for technical help can be similar to asking a Porsche 944 owner to help you rebuild the CV joints on your Mazda by ordering spare parts under their warranty.
- My memory is a bit fuzzy here but if I recall correctly each Perl script had to have a compiled PGM file in the system library. It took me forever to set these up correctly. They went soemthing like this, though:
Again, this was probably due to user ignorance rather than technical problems. I wrote those commands, they are from some notes I took during the project, and yet I to this day have absolutely no idea what they mean. They worked, though, I guess, because they paid me.CALL PGM(PERLDIST/PERL) PARM('/home/test.pl') CRTCLPGM PGM(TEST) SRCFILE(*LIBL/QCLSRC) CRTCLPGM PGM(CGIBIN/TESTER) SRCFILE(QGPL/QCLSRC) - The HTTP server on the AS/400 series was not standard (although I think that since then they have ported Apache?). The configuration of said server is done through a web interface, and it is not very usable compared to just editing httpd.conf. Also, it must be used to set up any CGI programs and directories you wish to run.
-
All this stuff runs under a Unix EMULATOR! I don't care what they call it, I am firmly convinced of this fact and nothing you can say will make me think any differently. ;-)
On the other hand, if you look at IBM lately, they seem to be pulling out all the stops in support of good old Linux/Apache/etc, and you might find that it is a more feasible option to go with a standardized web server platform in the long run.